can someone solve my problem

if the string is college
the output must be
c=1
o=1
l=2
e=2
g=1

it counts that how many a letter does it used
thnk you ^^