Here is a simple code to get the word count. To ease up the process, I do not count the words that are not separated by space
For Example “Mr.Arul” will still be counted as one word. but it makes sure whitespace is not counted as words
Here is the code