Using a counter instead of a defaultdict
Counter tallies all occurences