#include <bits/stdc++.h>
char a[100002];
char b[32];
int lena, lenb;
int ans;
int main() {
  scanf("%s%s", a, b);
  lena = strlen(a);
  lenb = strlen(b);
  ans = 0;
  char* j = a;
  while (j = strstr(j, b)) {
    ans++;
    j += lenb;
  }
  printf("%d\n", ans);
  return 0;
}
