#include <bits/stdc++.h>
using namespace std;
int main() {
  string gogol, apple;
  int res = 0, pos = 0;
  cin >> gogol;
  cin >> apple;
  int n = gogol.length();
  while (pos < n && pos != string::npos) {
    pos = gogol.find(apple, pos);
    if (pos != string::npos) {
      res++;
      pos += apple.length();
    }
  }
  cout << res;
  return 0;
}
