title: How to add or increment single item of the Python Counter class
body: <p>A <code>set</code> uses <code>.update</code> to add multiple items, and <code>.add</code> to add a single one.</p>
  <p>Why doesn't <a href="https://docs.python.org/3/library/collections.html#collections.Counter" rel="noreferrer"><code>collections.Counter</code></a> work the same way?</p>
  <p>To increment a single <code>Counter</code> item using <code>Counter.update</code>, it seems like you have to add it to a list:</p>
  <pre><code>from collections import Counter
  
  c = Counter()
  for item in something:
      for property in properties_of_interest:
          if item.has_some_property: # simplified: more complex logic here
              c.update([item.property])
          elif item.has_some_other_property:
              c.update([item.other_property])
          # elif... etc
  </code></pre>
  <p>Can I get <code>Counter</code> to act like <code>set</code> (i.e. eliminate having to put the property in a list)?</p>
  <p>Use case: <code>Counter</code> is very nice because of its <code>defaultdict</code>-like behavior of providing a default zero for missing keys when checking later:</p>
  <pre><code>&gt;&gt;&gt; c = Counter()
  &gt;&gt;&gt; c['i']
  0
  </code></pre>
  <p>I find myself doing this a lot as I'm working out the logic for various <code>has_some_property</code> checks (especially in a notebook). Because of the messiness of that, a list comprehension isn't always desirable etc.</p>