I have a mongodb collection which has collection with a tag and date field.
I want to count the number of all tags which can be done by this query
db.collection.count( { tags: "abc" })
But I would like to get counts of all unique tags together. And I also want to put a where condition on the date, as in I want to query for a certain time period.