#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b;
  char c;
  a = "";
  int ans = 0;
  while ((c = getchar()) != '\n') a += c;
  cin >> b;
  for (int i = 0; i < a.size(); ++i) {
    int n = b.size();
    if (a.substr(i, n) == b) {
      ans++;
      i += n - 1;
    }
  }
  cout << ans << endl;
  return 0;
}
