def __sub__(self, other):
if not isinstance(other, Counter):<EOL><INDENT>return NotImplemented<EOL><DEDENT>result = Counter()<EOL>for elem, count in self.items():<EOL><INDENT>newcount = count - other[elem]<EOL>if newcount > <NUM_LIT:0>:<EOL><INDENT>result[elem] = newcount<EOL><DEDENT><DEDENT>for elem, count in other.items():<EOL><INDENT>if elem not in self and count < <NUM_LIT:0>:<EOL><INDENT>result[elem] = <NUM_LIT:0> - count<EOL><DEDENT><DEDENT>return result<EOL>
Subtract count, but keep only results with positive counts.

        >>> Counter('abbbc') - Counter('bccd')
        Counter({'b': 2, 'a': 1})