I would go along the path of opening it with CFile and reading the whole thing into a buffer. (you can get the file size with CFileStatus or CStatus (cant remember acutall name)) Read it into a buffer and use strstr on it.
char* ptr = strstr(buffer,search_string);
int counter = 0;
while(ptr)
{
counter++;
ptr = strstr(ptr+1,search_string);
}
cout<<"value occurs "<<counter<<" times";
Something like that could do it I think.
Matt