#include <bits/stdc++.h>
using namespace std;
int main(int args, char **argv) {
  string gName, pSubName;
  cin >> gName;
  cin >> pSubName;
  int correctionLabel = 0;
  int strIndex = 0, subLen = pSubName.length();
  int leftBound, rightBound, leftTmp, rightTmp;
  leftBound = gName.find(pSubName, 0);
  rightBound = leftBound + subLen - 1;
  if (leftBound != -1) {
    correctionLabel++;
  }
  while ((strIndex = gName.find(pSubName, strIndex)) != -1) {
    leftTmp = strIndex;
    rightTmp = leftTmp + subLen - 1;
    if (leftTmp <= rightBound) {
      leftBound = leftTmp;
    } else {
      correctionLabel++;
      leftBound = leftTmp;
      rightBound = rightTmp;
    }
    strIndex += subLen;
  }
  cout << correctionLabel << endl;
  return 0;
}
