title: count number of names in list in python
body: <p>i have one list wich has names in it:</p>
  
  <pre><code>names = ['test','hallo','test']
  uniquenames = ['test','hallo']
  </code></pre>
  
  <p>with set i get the uniquenames so the unique names are in a different list</p>
  
  <p>but now i want to count how many names there are of each so test:2 hallo:1</p>
  
  <p>i have this:</p>
  
  <pre><code>for i in range(len(uniquenames)):
      countname = name.count[i]
  </code></pre>
  
  <p>but it gives me this error:
  TypeError: 'builtin_function_or_method' object is not subscriptable</p>
  
  <p>how can i fix that?</p>