s = input() t = input() l = len(t) k = 0 ans = 0 while k+l <= len(s): if s[k:k+l] == t: ans += 1 k += l else: k += 1 print(ans)