title: Python collections.Counter seems to break the original list
body: <p>Code:</p>
  
  <pre><code>sortedgroups = sorted(metagroups, key=lambda group: group[-1])
  categories = map(operator.itemgetter(-1), sortedgroups)
  categorycounts = collections.Counter(categories)
  
  print('Writing output files')
  
  with open('report.txt', 'a+') as f:
      for category in categories:
          f.write(category + '\n')
  </code></pre>
  
  <p>So this code works if I comment out:</p>
  
  <pre><code>categorycounts = collections.Counter(categories)
  </code></pre>
  
  <p>The for loop seems to break if I try to count the amounts of same strings in the categories list. Does <code>collections.Counter()</code> modify the original categories object?</p>