How do I count words in a PDF file on OS X?

I'd like to count words on a PDF file on OS X. The inspector doesn't contain the word count.


Use the GhostScript tool ps2ascii,

$ ps2ascii MSWiM_2016.pdf | wc -w
*** Warning: composite font characters dumped without decoding.
    8964

Simply open it in Microsoft Word and the word count appears at the bottom: enter image description here

Word's File/Properties/Statistics also has more statistics: enter image description here


I put together a small GUI app "PDF Word Counter", which returns the word count for inputted PDF files. It has no advantage over the other answer (ps2ascii) in terms of the word count returned, but it can be a good solution for those people who don't like to use the command line.