import sun.security.krb5.internal.crypto.n;

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

/**
 * Created by IntelliJ IDEA.
 * User: m08bvs
 * Date: 21.10.2009
 * Time: 17:28:45
 * 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" ) );
        int n = 0;
        String s = in.next();
        String a = in.next();
        int m = s.length();
        int k = a.length();
        if (s.equals("") || a.equals("")) {
            n = 0;
        } else {
            for(int i=0;i<=m-k;i++){
                //out.println(i + " " + s.substring(i,i+k));
                if( a.equals(s.substring(i,i+k)) ) {
                    n++;
                }
            }
        }
        out.println(n);
        out.close();
        in.close();
    }
}


