#include <bits/stdc++.h>
using namespace std;
long long Count(string& str, string& obj) {
  long long n = 0;
  long long pos = 0;
  while ((pos = obj.find(str, pos)) != string::npos) {
    n++;
    pos += str.size();
  }
  return n;
}
int main() {
  string s;
  string sub;
  cin >> s;
  cin >> sub;
  long long n = Count(sub, s);
  cout << n << endl;
}
