* Counting Bloom Filter https://en.wikipedia.org/wiki/Bloom_filter#Counting_filters
* Count-Min Sketch https://en.wikipedia.org/wiki/Count%E2%80%93min_sketch
Here's a library: https://datasketches.github.io/
However, you can probably fit an exact answer into memory with just a simple hashtable if you've only got 20 million objects. A single byte could be used as the state marker.
Either that, or just track 6 counts.