How to Set a Products Count Condition in WooCommerce
Minimum and Maximum Quantity for WooCommerce lets you limit how many units a customer can buy. The Products Count condition applies a group’s min and max quantity only when the cart already holds a set quantity of specific products.
You choose the products in the same rule group, then enter the quantity those products must reach. A wholesale store can require at least 6 units of two listed products together before a higher minimum quantity applies to those products.
In The Article
Benefits
Configuring Product Count can help:
- Apply a quantity limit only after customers add enough of the products you list.
- Treat several related products as one combined quantity.
- Keep other products on their own rules, because the count only covers products selected in that group.
How to Set a Product Count Condition
Step 1: Open a min/max rule
Go to Dotstore Plugins → Min/Max Quantity.
On Manage Rules, click Add New, or open an existing rule.

Step 2: Add a product condition
In the rule group, under Conditions, set the first condition to Product or Variable Product.
Choose Equal to ( = ) and select the products this count should include. Choose Not Equal to ( != ) when the count should cover cart products other than the ones you select.
Products Count cannot be saved on its own. The same group must include at least one Product or Variable Product condition. If it does not, saving shows: “To use the product count condition, it must require at least one product-based condition.”

Step 3: Add the Products Count condition
Click + Add Rule.
Set the new condition to Products Count, under Group Based Conditions.
Choose how the cart quantity should compare with your number:
| Option | What it does |
|---|---|
|
Equal to ( = )
|
The counted quantity must match the number.
|
|
Not Equal to ( != )
|
The counted quantity must not match the number.
|
|
Less than ( < )
|
The counted quantity must be below the number.
|
|
Less or Equal to ( <= )
|
The counted quantity must be the number or below.
|
|
Greater than ( > )
|
The counted quantity must be above the number.
|
|
Greater or Equal to ( >= )
|
The counted quantity must be the number or above.
|
In Type products count, enter a whole number of 1 or higher. The plugin adds up the cart quantities of the products selected in this group. It does not count each product as 1 regardless of quantity.
If the group has more than one condition, set below to Any or All rule match.
- Any applies the group when one condition matches.
- All applies the group only when every condition matches.

Step 4: Set the group quantity limits
In the same group’s Actions, enter Min Quantity and Max Quantity.
These are the limits applied to the product when Products Count matches. They are separate from the number in Type products count.
Step 5: Save and test the cart
Click Save changes.
Add the selected products to the cart and change their quantities. The group’s min and max quantity apply only when the combined quantity matches the comparison you set, and only for a product included by the Product or Variable Product condition in that group.
Example Use Cases
Bundle quantity before a limit applies. If two listed products should reach 6 units together before a minimum of 2 applies, select both products, set Products Count to Greater or Equal to ( >= ) 6, and set Min Quantity to 2.
Cap a product once the cart is large enough. If a product should be limited to 3 units after customers already have 10 of the listed products, set Products Count to Greater or Equal to ( >= ) 10 and Max Quantity to 3.
Conclusion
Products Count checks the combined cart quantity of the products selected in the same rule group. When that quantity matches your comparison, the group’s min and max quantity apply to those products.
FAQs
1. Where do I find Products Count?
Open Dotstore Plugins → Min/Max Quantity, edit a rule, and look under Conditions → Group Based Conditions. It is a Premium condition.
2. Why will the rule not save?
The same group needs a Product or Variable Product condition. Products Count uses that condition to decide which cart items to add up.
3. Does it count products or units?
It adds the cart quantities. Two units of one selected product and four units of another count as 6.
4. Does a variation count toward the parent product?
Yes. A variation is matched by its own ID and its parent product ID, so a Variable Product condition includes that variation’s quantity.