Hi follow given steps:
1. add a false collection to your base query using additional data.


2. add enrichment to compute your aggregates:
3. in your enrichment go to Advanced Relations tab and add a relation to your collected added in the previous query using the @collectionLink as the source and destination expression.

4. Using additional data in enrichment add your aggregates:


now you can use this CountRecords in your email using personalisation field.
Regards,
Amit