How to Count occurrences of an item in a list in python
from collections import Counter
1ist1 = ['Peter', 'Rose', 'Donald', 'Peter']
a = Counter(listl).get('Peter')
print(f'Peter appears in the list {a} times')
# Output:
# Peter appears in the list 2 times