# Why is there such a huge discrepancy between the Overleaf and Microsoft Office Word word counter

I've just finished my dissertation, which I chose to write using a template on Overleaf (the LaTeX template editor).

My word count on Overleaf was about 18,000. I thought I would C&P into Word and it came up as 21,500. Obviously a huge dilemma, since my word limit is 20,000.

Is there anything people know about Overleaf that could account for the difference in word count? I was thinking maybe the preface/abstract/appendix isn't included in the word count, but then I am sure this wouldn't fill the difference.

• What did you copy into MS Word? The TeX component or the PDF text? If it is the first you might encounter TeX macros treated as own words, if the second maybe the wrong interpretation of some characters (like ligatures). – TeXnician May 15 '17 at 7:36
• That's unlikely, there are a few sections with lots of maths. Presumably Overleaf doesn't count these, but could Word be counting each symbol as one word? There definitely isn't enough equations to account for the difference by themselves. – ODP May 15 '17 at 7:50
• So I assume you copy the TeX code?! Concerning math: I do not know how Overleaf counts that, but you could test this with a simple document. Here are some further things which Word might count as words: environments (figure, table), tabular delimiters, TeX macros (like \par), ... – TeXnician May 15 '17 at 7:57
• Counting words is quite a complex topic, different tools giving different results is to be expected, in my experience (which, of course, doesn't help you with your dilemma, I'll admit). Overleaf seems to use texcount to count its words: overleaf.com/help/85#.V10GGVV_eV4 I would recommend looking at how texcount counts words, and seeing if you can find any information about how Word counts words (or if Word can be configured -- I haven't used it in years, so I don't know). Maybe that can tell you where the discrepancy comes from. – alpenwasser May 15 '17 at 8:04
• word counting is mostly just nonsense to satisfy arbitrary thesis requirements. How many words are in The matrix $A=\begin{pmatrix}a&b\\c&d\end{matrix}$ ? The answer is some number between 2 and 9 depending what and how you count. If you take that amount of variability and apply to a whole document the result is rarely meaningful. – David Carlisle May 15 '17 at 8:25

(I'm co-founder at Overleaf.) As alpenwasser indicates in a comment, Overleaf uses texcount to count the words. You can find out more here: https://www.overleaf.com/help/85.
At the time of writing, we run texcount with the options -quiet -merge -incbib -dir -sub=none -utf8 -sum.
A way of customising the texcount options on Overleaf is on our roadmap. In the meantime, if you'd like to try out other options, you can run texcount locally or use the handy web interface, if your text is easily copy-and-paste-able: http://app.uio.no/ifi/texcount/online.php