import collections
def f(s):
s = dict(collections.Counter(s))
if i in s:
count = s[i]
return count
s = "ABCaD"
i = "a"
print(f(s))
import collections
def f(s):
s = dict(collections.Counter(s))
if i in s:
count = s[i]
return count
s = "ABCaD"
i = "a"
print(f(s))