xxxxxxxxxx
from collections import Counter
count = Counter(['apple','red','apple','red','red','pear'])
count
Counter({'red': 3, 'apple': 2, 'pear': 1})
xxxxxxxxxx
i = ['apple','red','apple','red','red','pear']
d = {x:i.count(x) for x in set(i)}
print d