Count pages in a folder full of .doc files
The AppleScript in the linked page queries Spotlight's metadata to get the page count for each PDF document. (Specifically, the kMDItemNumberOfPages value.)

It's up to applications to provide metadata to Spotlight, and MS Word doesn't provide page numbers to Spotlight. 

So you can't change the script easily, and will need another method.