You can use count method :
>>> from collections import Counter
>>> a = ['violet', 'Indigo', 'violet', 'green', 'violet', 'indigo', 'violet' , ' green' , 'Indigo']
>>> Counter(z)
Counter({'violet': 4, 'Indigo': 2, 'green': 1})
Hope this helps, Cheers....!!