{"name":"countOfTypes","aggregate":"count","groupBy":[{"property":["type"]}]}
count
List of properties to group the count by. It's currently only possible to group by 0 or 1 properties. If grouping by 0 properties, the aggregate value is the total count of all documents.
User defined name for this aggregate
{"name":"countOfTypes","aggregate":"count","groupBy":[{"property":["type"]}]}