How to aggregate documents (more than 16K)?
How can I count all the documents of a table? Also, I need to count the documents by month, for example: All the invoices per year, per month, per week, etc.
I would not like to export to elasticsearch because would make me lose the realtime capabilities.

