count

Sums the number of Resources returned from the preceding query.

Consider a simple hosts Resource query to get all hosts.

op>
hosts
 ID | TYPE | NAME                | REGION    | AZ
 1  | HOST | i-052a365e984d32cc8 | us-west-2 | us-west-2a
 2  | HOST | i-0029b1ae1177ed57a | us-west-2 | us-west-2a
 3  | HOST | i-0790fc0b3b31278c5 | us-west-2 | us-west-2a
 4  | HOST | i-093bd00fe05f465a5 | us-west-2 | us-west-2a
 5  | HOST | i-099afa4a819cd99df | us-west-2 | us-west-2a

Piping the count command sums the total host Resources count.

op>
hosts | count
 RESOURCE_COUNT
 5