Counting the number of occurrences of each element in a list with Python’s Counter https://from-locals.com/python-collections-counter/