s[13000];r;main(p,c){for(gets(s),gets(c);gets(c);)for(p=s;p=strstr(p,c);++p)++r;r=!printf("%d",r);}