One really, really easy way to think of a word is just as non-whitespace characters surrounded by spaces (or the ends of the string). With that in mind, I think something as simple as this might work for you . . .
Code:
int word_count(const char *string) {
int wc = 0;
int x = 0;
for(;;) {
/* skip whitespace, if any */
while(string[x] == ' ') x ++;
/* stop if we've reached the end of the string */
if(!string[x]) break;
/* skip over the word */
while(string[x] != ' ' && string[x]) x ++;
/* skip whitespace, if any */
while(string[x] == ' ') x ++;
/* increment word count */
wc ++;
}
return wc;
}
[Coloured with codeform.]
Of course, there are other ways (perhaps even simpler ones). But hopefully that will give you some ideas. Note that I haven't test it, so no guarantees. 
[edit] As others have suggested, it's probably better not to mess with the loop variable inside the loop, as I did (trying to make the code a little similar to yours). Another easy way to do this is to remember the character you saw during the last iteration of the loop (specifically, whether it was a space or not). Then just take note when you change from space to non-space, and from non-space to space. In the former case, you have the beginning of a word, so count it. For example:
Code:
char last_char = ' ';
for(x = 0; x < length; x ++) {
if(last_char == ' ' && string[x] != ' ') {
wc ++;
}
last_char = string[x];
}
[/edit]