Here's the beginning of a class for you :
WordCounter( const char * w )
: word( w )
count = 0;
function you can make an instance of a collection of these. You have used a vector previously and that's a good choice for this :
std::vector< WordCounter > words;
Hopefully that's enough to get you started.