Can you try the below JS code, I hope you expect this.
var myWords = app.activeDocument.stories.everyItem().words.everyItem().getElements(); alert(myWords.length);
tomaxxi. Some very nice stuff you have there.
yes is correct but we need some more adding on this script
1. Run to batch and every page count log how many word count on this page
2. we don't need to count running headers and footers, Page numbers and pasteboard iteam.
your script count on every pasteboard iteam count we don't need we need only count text area?
please send me update JS