#include <bits/stdc++.h>
using namespace std;
int main() {
  int num = 0;
  string str1, str2;
  cin >> str1 >> str2;
  int len1 = str1.length(), len2 = str2.length();
  int j = 0;
  for (int i = 0; i < len1; i++) {
    if (str1[i] == str2[j])
      j++;
    else {
      i -= j;
      j = 0;
    }
    if (j == len2) num++, j = 0;
  }
  cout << num << endl;
  return 0;
}
