---
title: COUNT Command
slug: pl-check-links/count-command
docTags: 
createdAt: 2026-02-23T07:45:23.145Z
---

The COUNT command calculates the total number of animals that match certain items and conditions. It offers a quick and easy way to get a total number of animals meeting specific criteria.

![](https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/MgNslBlBX0EHPFrh52TOQ_command-results-page3.png)

See the following COUNT examples:

:::ExpandableHeading
### Determine the total number of animals due to be dried off for a specific pen

COUNT FOR LACT>0 DCC>220 DDAT=0 PEN=1

![](https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/tbqdbA1N-KwkGOQldGu3j_count-example1n.png)
:::

:::ExpandableHeading
### Check the total number of animals in the hospital pen (pen 12)

COUNT FOR PEN=12

![](https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/NreMR53N-897blgAptndC_count-example2n.png)
:::

:::ExpandableHeading
### Identify the number of animals with an active milk withhold

COUNT FOR MKDAT>TODAY

![](https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/3O0pGbSBCKjxZjEsfQBjs_count-example3n.png)
:::

:::ExpandableHeading
### Check the total number of animals in their first lactation for specific pens

COUNT FOR (PEN=1 LACT=1) (PEN=2 LACT=1)

![](https://api.qa.archbee.co/api/optimize/zICxj0dnLereb6UUrBA3-/Lg-dqtirj2vKKuBHB8LCn_count-example4n.png)
:::

:::ExpandableHeading
## Related Topics

- [Command Reference Guide](docId\:hLBNo9ewWKq530HgQtQNN)
- [../DairyComp/ReportsWorklists/ReportWorklistResults.htm](docId\:ccHmaj9YUZYEy8iPIgX5C)[Reports/Worklists Results](docId\:ccHmaj9YUZYEy8iPIgX5C)
:::

[\< Return to command line Overview](docId:8tcICBlLYstevG5-oFMd0)
