#include <stdio.h>
#include <string.h>
int search(char* sourcestr,char* substr)
{
	if(substr==NULL) return 0;
	int ret=0;
	char* begin=sourcestr;
	while(*begin!='\0')
	{
		if(strstr(begin,substr)!=NULL && begin==strstr(begin,substr)) ret++;
		begin++;
	}
	return ret;
}
int main()
{
	char* sourcestr="888a888b8c88d8a8a8a8";
	char* substr="8a8";
	int count=search(sourcestr,substr);
	printf("%d\n",count);
    return 0;
}