could have just used `cls.count[c].get('hit', 0)`, which does the same thing as your code.

Mostly commenting for future reference, since python has a nice `dictionary.get()` which supplies default values for non-existent keys.