what's the pythonic way to count the occurrence of an element in a list?
<p>this is what I did. is there a better way in python?</p>

<pre>
for k in a_list:   
  if kvMap.has_key(k):
    kvMap[k]=kvMap[k]+1   
  else:
    kvMap[k]=1
</pre>

<p>Thanks</p>
