>>> from collections import Counter>>> Counter(['apple','red','apple','red','red','pear'])Counter({'red': 3, 'apple': 2, 'pear': 1})