/**
 * Created by IntelliJ IDEA.
 * User: o_220
 * Date: 21.10.2009
 * Time: 17:54:51
 * To change this template use File | Settings | File Templates.
 */  import java.util.*;
    import java.io.*;
public class Main {
    public static void main(String[] args) throws Exception{
        Scanner s= new Scanner(new File("count.in"));
        PrintWriter p= new PrintWriter (new File("count.out"));
        //p.println(1);
        String s1 = s.next();
        int l1 = s1.length();
        String s2 = s.next();
        int l2 = s2.length();
        int n = 0;
        //p.println(s1);
        //p.println(s1.charAt(1));
        if (l1<l2) {
            p.println(0);
        }   else {
                for (int i=0; i < l1-l2+1; i++) {
                    if (s2.equals(s1.substring(i,i+l2))) {
                        n++;
                    }
                }
                p.println(n);
        }
        s.close();
        p.close();
    }
}
