If the limit is the same for all carts
On the Basic Settings page for your registration form, find the Registration Cap & Limits link.

On that page, you can set the Maximum or Minimum number of people in a cart:

If the limit changes depending on selected options
On any option field at the group level of your registration form, click the “Edit” link beside an option

Then, you can set the Maximum and Minimum number of people in the cart for any carts where that option is selected.

Common uses of this would be a registration that offers family or single registration, as in the example above, where you want to limit solo registrants to one person per cart so they don’t skip out on paying any fees. Of for a race registration, you might want to have a team option, where registrations that selected the team option must register exactly 4 people before they can check out
How this Works
Normally, during the registration process, registrants see two buttons at the bottom of each page: “add another person” and “checkout”. When you have set limits on your cart size through either of the above methods, the “checkout” button is not displayed until at least the minimum number of people have been entered. Once the maximum number of people have been entered, the “add another person” button goes away, and the only button registrants can click is “checkout” to complete the registration process.