Find index and number of words in c++ file.

Hey, I want to make a program in which I will find the index of word and count how many words there in a txt file using c++.