COUNT Command

The COUNT command calculates the total number of animals that match your command condition(s). It is a quick and easy way to get a total number of animals meeting specific criteria.

Use the COUNT command to assist you with a variety of tasks, including the following examples:

COUNT command syntax is spelled out using the example below: 


Command (required): DairyComp command.


Switch(es): control the results returned by modifying or limiting the command to specific data. The following switches are supported for COUNT in the current Platform release: 




Includes results for both live and dead animals. Without the switch, command results include live animals only.


Limits results to dead cows only.



Condition filter (required):  Filter for the command. Available filter: FOR.


Conditional item(s) (required):  Item conditions that must be matched to be included in the results. The following conditional operators may be used:


Definition for numeric and date values

Definition for string values


equal to

equal to


not equal to

not equal to


greater than



greater than or equal to



less than

does not contain


less than or equal to