I explained how to do this on an episode of the BuiltOnAir Podcast:
You can copy the base shown in the podcast above on the Universe here:
Some changes you may want to make for your own version:
- In your case, you may want to use a “Created Time”-type field instead of a regular date field.
- You also might want to use multiple Count fields with conditions applied. That way you can have one field for the “Count of Category A” and another field for “Count of Category B”