In a classic argument about whether a naive approach to counting the words of a TeX manuscript could be successful, David Carlisle provided the following snippet as an example:
Source: http://ctan.org/pkg/xii
Clearly, a naive approach may find a handful, if any words, as this TeX program is obfuscated to a degree of infamy. In fact, it is a demonstration that the only correct way of counting words in a LaTeX document is by inspecting the final produced output, be it a PDF or HTML document. Authorea is one of the few tools that correctly approaches word count and can tackle this example successfully, with a click of a button.
You can enjoy the full carol here.