switched from dict to collections.Counter

But it didn't let me remove as much code as I would have liked.