/**
 * Created by IntelliJ IDEA.
 * User: o_215
 * Date: 21.10.2009
 * Time: 18:29:52
 * To change this template use File | Settings | File Templates.
 */
import java.util.*;
import java.io.*;
public class B {
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 string=in.nextLine();
    String subString=in.nextLine();
    int i=0; int count=0; int L=string.length(); int l=subString.length();
    while(i+l<=L){
        if(subString.equals(string.substring(i,i+l))){
            count++;
        }
        i++;
    }
    out.println(count);
    in.close();
    out.close();
}
}
