If you have a generator or set of inputs that are not unique and that I can't just query or store in memory how can I best keep a running tally?
If memory is not an issue, creating a list than using count or using Counter as in this Question/Answer
However, without sufficient memory or no knowledge of the items, I think a dict makes most sense. Key being the values coming in and value being the count. Is there a better way though?
An example would be possibly be a non-equally weighted random generation of numbers. like an infinite sided die where there are a lot more of some numbers than other but we don't know which numbers those are.