Create count items in list

Imports

from collections import Counter

Create count

# Create count for items in list
counter = Counter(['orange', 'banana', 'orange', 'fruit'])

# View counter
counter
Counter({'orange': 2, 'banana': 1, 'fruit': 1})