Check out example codes for "how to see number of words in google docs". It will help you in understanding the concepts better.

Code Example 1

Tools > word Count
Ctrl + shift + C

Learn ReactJs, React Native from akashmittal.com