I am writing a thesis in Overleaf and would like to know my word count. However, I am seeing this error in the image when I try and view it.

enter image description here

The project does not show any errors in logs, so I am confused as to what this means.

This is the directory structure:

enter image description here

enter image description here

And the thesis.tex file seems to be the file that sets everything up. This is what it contains:


% Configuration


%\def\assocsupervisor{Comment this line to remove assoc supervisor}

% Packages

\usepackage[colorlinks=true,citecolor=blue,urlcolor=blue,linkcolor=black,plainpages=false,pdfborder={0 0 0},backref=false]{hyperref}

% mine
\usepackage{booktabs} % for nice looking tables with \toprule etc
\usepackage{csquotes} % for block quotes
\usepackage{longtable} % for table across two pages
% \usepackage{graphicx} % images
% \usepackage{subcaption} % for side by side images
% /mine

\rcDecimalSignOutput{.} % rccol




\newcommand{\todo}[1]{{\color{red} #1}}

% Maths functions

% Setup

%   Page size:
\oddsidemargin=0cm  % really 1in

% initial page numbers:  i, ii, iii, ...


% Start


% Title page


% intro pages

% tables

\renewcommand*\numberline[1]{\hb@xt@\@tempdima{#1 \hfil}\hspace*{1em}}

% Chapters

% main page numbers:  1, 2, 3, ...


% End

% Bibliography

%%%% Appendices


Thank you very much for anyone that can assist!

  • Welcome to MSE. Can't you share more information than that? Oct 20, 2021 at 9:45
  • Thanks for the reply. Sorry, I realise it wasn't very detailed. I have just edited it and added the directory structure and the main thesis.tex file that seems to organise everything. I am using a template so I am not super familiar with how it works. Is that enough information or can I give more?
    – Sam
    Oct 20, 2021 at 9:55
  • It's quite better now. Oct 20, 2021 at 9:58
  • Okay great, thanks for the feedback!
    – Sam
    Oct 20, 2021 at 10:00
  • are you running the word count on the top level, the overleaf page says " Note that your project's main document must be on the project's top level (i.e. not within a folder) for texcount to work on Overleaf. " the highlighted sidebar seems to indicate you are on discussion.tex and thesis.tex is in a thesis2 directory Oct 20, 2021 at 10:01

1 Answer 1


I just figured it out myself! I guess asking this question was like me rubber ducking the internet. Anyway, turns out the paths to the individual .tex files in my directory need to be absolute paths. Its strange that this only affected the word count. Maybe someone can shed some light on that. Anyway, here is the code before it was fixed:


And here is it after the fix (Overleaf offered an autocomplete on the paths and that's how I figured out they were wrong):

\input{thesis 2/introduction/introduction}
\input{thesis 2/litreview/litreview}
\input{thesis 2/methodology/methodology}
\input{thesis 2/evaluation/evaluation}
\input{thesis 2/results/results}
\input{thesis 2/discussion/discussion}
\input{thesis 2/conclusion/conclusion}
\input{thesis 2/appendix/appendix}

Thanks to anyone that looked at this!

  • BTW It won't let me accept my own answer so I don't know how to close this question lol sorry
    – Sam
    Oct 20, 2021 at 10:09
  • you will be able to accept once you get above 1 rep I think but I'm confused if your main thesis.tex is in the thesis 2 folder this will no longer work with tex will it? The issue is that pdflatex is run in a special build folder so it knows where things are but auxiliary programs like texcount do not, which is why overleaf documents that you must not start in a folder Oct 20, 2021 at 10:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .