BTW, there's also `collections.Counter` for this sort of thing.