from collections import Counter c = Counter(input().upper()) to_find=input().upper() print(c[to_find])
两种方法