Not sure what you mean by, "the number of words in a particular word".
you mean you want to count words in a string then here's a starting point for you (check the exact syntax). It assumes a single space between each word.
dim words as string() = sentence.split(" ")
dim wordCount as integer = words.length
Look at the string.replace() method for a simple way of removing multiple spaces from the input. Then look at regex for a more sophisticated way of removing multiple occurrences of characters/strings.
If that isn't what you mean by your question please give an example of what you're trying to do.