#include <bits/stdc++.h>
using namespace std;
int main() {
  char *p, a[100001], b[31];
  int ans = 0;
  scanf("%s%s", a, b);
  p = a;
  while (strstr(p, b) != NULL) {
    ans++;
    p = strstr(p, b) + strlen(b);
  }
  printf("%d\n", ans);
  return 0;
}
