#include <bits/stdc++.h>
using namespace std;
struct RTC {};
int main() {
  ios_base::sync_with_stdio(false);
  string s, t;
  cin >> s >> t;
  vector<pair<int, int> > pos;
  int beg = 0;
  while (true) {
    auto p = s.find(t, beg);
    if (p != string::npos) {
      pos.emplace_back(p, p + ((int)(t).size()) - 1);
    } else {
      break;
    }
    beg = p + 1;
  }
  int ans = 0;
  if (((int)(pos).size()) > 0) {
    int last = pos[0].second;
    ans++;
    for (int i = 1; i < ((int)(pos).size()); i++) {
      if (pos[i].first > last) {
        last = pos[i].second;
        ans++;
      }
    }
  }
  printf("%d\n", ans);
  return 0;
}
