Since your tokens are seperated by white space, you can use formatted input to count the tokens:
In this example, I get strings from an input stream until the stream is no longer good (there's no more strings in the stream). The same concept can be applied to other streams.
using namespace std;
string s = "\"I don't got time for pain. The only pain "
"I got time for is the pain I put on fools "
"who don't know what time it is!\", TTT";
size_t num_tokens = 0;
for (; iss.good(); num_tokens++)
iss >> token;
cout << num_tokens << endl;