I want a code which counts votes from a list, for example, from this list `[jack , jack , mat , tom , tom , tom ]`, print count of each candidate:

Here is the code I tried but doesn't work:

```
votes = ['jack' , 'jack' , 'mat' , 'tom' ,'tom' , 'tom']
counter = dict()
for string in votes :
    if string in counter :
        counter[string] =+ 1
    else:
        counter[string] = 1
for this_one in list (counter.keys()) :
    print (this_one , counter[this_one])

```