/**
 * Created by IntelliJ IDEA.
 * User: m09dam
 * Date: 21.10.2009
 * Time: 18:07:39
 * To change this template use File | Settings | File Templates.
 */
import java.util.*;
import java.io.*;

public class problem_2 {
    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 s1 = in.next();
        String s2 = in.next();
        int i ;
        int m = s1.length();
        int n = s2.length();
        int j = 0;
        String s3 = "";
        if(m>=n){
            for (i=0 ; i<=m-n ; i++){
                    s3 = s1.substring(i,i+n);
                    if (s2.equals(s3)){ j++;
                    }
            }
        }
        if(m<n){ j = 0;
        }
        out.println(j);
        out.close();
        in.close();
    }
}
