There is no predetermined cap on the number of Halo games. Since taking stewardship with Halo 4, 343 Industries continues developing the franchise as long as it remains viable.
Expect Halo Infinite to remain the primary platform for years, with major expansions or a next mainline entry likely arriving in the late 2020s. Spin-offs can appear at any time.