How to make a simple counter scale to trillions by using the right count functions paired with pre-aggregations

Source