import java.util.*;
import java.io.*;

public class Count {
	public static void main(String[] args) throws Exception{
		Scanner in = new Scanner(new File("count.in"));
		PrintWriter out = new PrintWriter("count.out");
		String s1 = in.next();
		in.nextLine();
		String s2 = in.next();
		System.out.println("String1 = " + s1);
		System.out.println("String2 = " + s2);
		int l1 = s1.length();
		int l2 = s2.length();
		System.out.println("Length1 = " + l1);
		System.out.println("Length2 = " + l2);
		int result = 0;
		for (int i = 0; i < l1 - l2 + 1; i++){
			//out.println("'" + s1.substring(i, i + l2) + "'");
			if (s2.equals(s1.substring(i, i + l2))){
				result = result + 1;
			}
		
		}
		System.out.println("result = " + result);
		out.print(result);
		//System.out.println(s1.substring(1,l2+1));
		
		
		in.close();
		out.close();
	}

}
