Skip to main content
The count aggregation type is straightforward. It tallies the exact number of events received during a period.

COUNT billable metric

Here is how you can create a count aggregation from the UI:
  1. Access the “Billable metrics” section via the side menu;
  2. Create a new billable metric;
  3. Define a name, a code and an optional description;
  4. Select “count” as the aggregation type;
  5. Apply dimension groups if any; and
  6. Click “Add billable metric”.
This billable metric is metered only, meaning it cannot be recurring, and the number of billing units resets to 0 at the end of each period.

Calculation example

Lago calculates the COUNT(events.code) for the two following events received.
In that case, with this aggregation type, Lago simply counts the number of events received, resulting in a billable value of 2 units.