'Union is the maximum of value in either of the input counters.
>>> Counter(\'abbb\') | Counter(\'bcc\')
Counter({\'b\': 3, \'c\': 2, \'a\': 1})'

def __or__(self, other):

    if (not isinstance(other, Counter)):
        return NotImplemented
    _max = max
    result = Counter()
    for elem in (set(self) | set(other)):
        newcount = _max(self[elem], other[elem])
        if (newcount > 0):
            result[elem] = newcount
    return result
