I think the example in #4 misses the point of using a Counter. He could have done the very same for-loop business if mycounter was a defaultdict(int).
The nice thing about a Counter is that it will take a collection of things and... count them:
>>> from random import randrange
>>> from collections import Counter
>>> mycounter = Counter(randrange(10) for _ in range(100))
>>> mycounter
Counter({1: 15, 5: 14, 3: 11, 4: 11, 6: 11, 7: 11, 9: 8, 8: 7, 0: 6, 2: 6})
Docs: https://docs.python.org/2/library/collections.html#counter-o...