import java.util.Scanner;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class StrConut {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String strSrc = scan.nextLine().toUpperCase();
String c = scan.nextLine().toUpperCase();
Pattern p = Pattern.compile(c);
Matcher m = p.matcher(strSrc);
int count = 0;
while (m.find()){
count++;
}
System.out.println(count);
}
}