# Quantifier

Learn how to use quantity-based filters in event expressions.

Quantifiers let you specify how often an event must occur in order to satisfy an expression. They are useful when you want to check whether an event happened exactly, at least, or at most a certain number of times.

## Syntax

The syntax for quantifiers is as follows:

| Quantifier                    | Description                                 |
| ----------------------------- | ------------------------------------------- |
| `exactly /*<number>*/ times`  | Matches exactly that number of occurrences. |
| `at least /*<number>*/ times` | Matches that number or more.                |
| `at most /*<number>*/ times`  | Matches that number or fewer.               |

You can use the singular or plural form of "time" regardless of the number specified.

## Examples

Check for a specific number of sign-ins:

```cql
user has signed in exactly 3 times
```

Check if a product was viewed at least twice:

```cql
user has viewed a product with name "Sneakers" at least 2 times
```

Check if a page was viewed at most once:

```cql
user has viewed a page with url like "support" at most 1 time
```
