#include <bits/stdc++.h>
using namespace std;
string s;
string str;
int main() {
  cin >> s >> str;
  int ans = 0;
  int t = 0;
  int len = str.size();
  while ((t = s.find(str, t)) != string::npos) {
    ans++;
    t += len;
  }
  printf("%d", ans);
}
