# Count macro

Learn how to count items in a collection.

This macro counts the elements in a [collection](/reference/cql/data-types/core/collection).

The count refers to the total number of elements in a given collection, which is also known as its *size*.

## Syntax

This macro has the following syntax:

```cql
count of /*<collection>*/
```

You can also prefix the macro with a definite article for readability:

```cql
the count of /*<collection>*/
```

## Parameters

These are the supported parameters:

- `collection`: `collection`

  A collection of elements you want to count.

## Examples

Here is an example of how to count the number of items in a list:

```cql
count of [1, 2, 3] // 3
```

You can also count map entries:

```cql
count of ["a": 1, "b": 2, "c": 3] // 3
```
