Check if the character is not a letter that means there is a space , then we increment the wordCount by one and set the isWord by false
else if ( ! isLetter ( ch [ i ] ) && isWord ) { wordCount ++ ; isWord = false ; }