import java.util.Scanner;
import java.io.File;
import java.io.PrintWriter;

/**
 * Created by IntelliJ IDEA.
 * User: m08sds
 * Date: 21.10.2009
 * Time: 17:20:26
 * To change this template use File | Settings | File Templates.
 */
public class count {
    public static void main (String [] args) throws Exception {
        Scanner in = new Scanner (new File("count.in"));
        PrintWriter out = new PrintWriter(new File ("count.out"));
        String s = in.next();
        String a = in.next();
        int n=s.length();
        int m=a.length();
        int k;
        int i;
        if(n==0);
            k=0;

        /*if (n>=m)*/ {
            k=0;
            for (i = 0; i <=(n - m); i++){
                if (a.equals(s.substring(i,i+m))) k++;
                /*  else k=k-1;*/
                

            }

        } out.println(k);
        out.close();
            in.close();

        }
    }



