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

On that page, scroll down to the Advanced Limits section, from there you can set the Maximum or Minimum number of people in a cart:

If the limit changes depending on selected options
On the Edit Registration Form page, select any option field at the group level of your registration form to edit the element. From there, then click the “Edit” link beside the desired 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. Or for a race registration, you might want to have a team option, where registrants 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.