#include <bits/stdc++.h>
using namespace std;
void subString(string str, int n) {
  for (int len = 1; len <= n; len++) {
    for (int i = 0; i <= n - len; i++) {
      int j = i + len - 1;
      for (int k = i; k <= j; k++) cout << str[k];
      cout << endl;
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  string s1, s2;
  cin >> s1 >> s2;
  long long count = 0, n, len;
  n = s1.size();
  len = s2.size();
  for (int i = 0; i < n; i++)
    if (s1.substr(i, len) == s2) {
      count++;
      i = i + len - 1;
    }
  cout << count;
  return 0;
}
