import re S = input() T = input() text = re.compile(r"{}".format(T)) result = re.findall(text, S) print(len(result))