there are (number) (objects)
This construct tests whether there is a specific number of objects of a given type in the current data set or the specified collection.
Purpose
You use this construct to determine whether the current data set contains exactly the specified number of occurrences of a particular object.
Syntax
there are <number> <objects> [in <list>] [where <test>,*]
Description
Use the optional in clause to apply the test to a specific collection of objects. Use one or more optional where clauses to filter the objects to be counted with one or more conditions.
This construct can only be used in the if part of a rule.
Example
The following condition tests if the number of Gold customers is equal to 8.
if
there are 8 customers
where the category of each customer is Gold
then...