/**
 * Created by IntelliJ IDEA.
 * User: m09baa2
 * Date: 21.10.2009
 * Time: 17:21:31
 * To change this template use File | Settings | File Templates.
 */
import java.io.*;
import java.util.*;
public class Search {
    public static void main ( String[]args)throws Exception{
        Scanner s = new Scanner (new File("count.in"));
        PrintWriter p= new PrintWriter (new File("count.out"));

        String str1=s.next();
        String str2=s.next();

        int n1= str1.length();
        int n2= str2.length();
        int count =0;


        if (n2>n1){
           p.println(0);
       } else
        {
            for (int i=0; i<=(n1-n2); i++){


                if (str2.equals(str1.substring(i,i+n2))){
                    count++;
                }
            }
p.print(count);
        }


        p.close();
        s.close();


    }
}
