from collections import defaultdict


def count_dups(l):
    """
    report the number of duplicates in a python list
    """
    tally=defaultdict(int)
    for x in l:
        tally[x]+=1
    return tally.items()