count number of character

Using empty list and it creates an index. If character exists, dictionary will be updated by number.

st = 'aaavbbaa'
lis = []
di = {}
for i in st:
	if i not in lis:
		lis.append(i)
		di[i]=1
	else:
		di[i]+=1

>>>di
{'a': 5, 'b': 2, 'v': 1}