Copy the script given to your script in editor. Save the script, and then reload the google docs that the script is attached to. You can now run the word counter function from the tabs.
Khadka's Coding Lounge.
@kcl
As a freelancer, I create addons and scripts to automate google products such as sheets, Gmail, docs with apps script.