Python: Using a dictionary to count the items in a list
<p>I'm new to Python and I have a simple question, say I have a list of items:</p>

<blockquote>
  <p>['apple','red','apple','red','red','pear']</p>
</blockquote>

<p>Whats the simpliest way to add the list items to a dictionary and count how many times the item appears in the list.</p>

<p>So for the list above I would like the output to be:</p>

<blockquote>
  <p>{'apple': 2, 'red': 3, 'pear': 1}</p>
</blockquote>
