def count_duplicates(items):
    """Return a dict of objects and thier counts (like a Counter), but only count > 1"""
    c = Counter(items)
    return dict((k, v) for (k, v) in viewitems(c) if v > 1)
def count_duplicates ( items ) : c = Counter ( items ) return dict ( ( k , v ) for ( k , v ) in viewitems ( c ) if v > 1 )
Return a dict of objects and thier counts (like a Counter), but only count > 1