Two lessons: Dictionaries are perfect for counting. Keys are the items, values are the counts.
The get(key, default) pattern handles missing keys cleanly. No need for if-else. This pattern appears everywhere: counting characters in a string, counting votes, counting any repeated items. learn it.