Showing first {{hits.length}} results of {{hits_total}} for {{searchQueryText}}{{hits.length}} results for {{searchQueryText}}

No Search Results


You can obtain a word count by selecting Menu and then Word Count as demonstrated in this short video:

This will run the texcount utility to count the words in the project's main file and any files imported into your project's main file via \include and \input. 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.


Contents

[edit] Include references in the word count

By default, references, headers, captions, floats, displayed math etc are not included in the count. To include the citations and references:

  1. Adding %TC:incbib in your .tex file's preamble, and then
  2. Add a file named latexmkrc (no file extension) in your project, with the following line in it (change "main" to whatever your main document .tex file is named)
    END { system('cp', 'output.bbl', 'main.bbl'); }

Note that this workaround is only applicable if you are using a manual thebibliography list or BibTeX. texcount does not currently support biblatex.

See #Run texcount with custom parameters for showing word counts for headers, captions, floats, displayed math etc.

[edit] Ignoring some sections

At times, you may want to exclude certain sections or regions from the word count. You can place %%TC:ignore and %%TC:endignore around such regions. For example:

%%TC:ignore
\maketitle
 
\begin{abstract}
...So the title page and abstract will not be word-counted...
\end{abstract}
%%TC:endignore


[edit] Run texcount with custom parameters

If you'd like to use your own set of [texcount parameters] to customize the output, or to perform a character count, or to include captions etc, you can do so by defining a few commands in your project (though this then involves using LaTeX commands...). For example:

\newcommand{\detailtexcount}[1]{%
  \immediate\write18{texcount -merge -sum -q #1.tex output.bbl > #1.wcdetail }%
  \verbatiminput{#1.wcdetail}%
}
 
\newcommand{\quickwordcount}[1]{%
  \immediate\write18{texcount -1 -sum -merge -q #1.tex output.bbl > #1-words.sum }%
  \input{#1-words.sum} words%
}
 
\newcommand{\quickcharcount}[1]{%
  \immediate\write18{texcount -1 -sum -merge -char -q #1.tex output.bbl > #1-chars.sum }%
  \input{#1-chars.sum} characters (not including spaces)%
}


Assuming your file is named main.tex, invoking these commands in your project would then have the following output in the PDF. The output includes breakdown for each sub(section), as well as for captions, floats, displayed equations etc. Note that due to how the Overleaf build process is configured, you must include `output.bbl` in the `texcount` command for BibTeX-produced reference lists to be counted as well.

% Don't count these!
%%TC:ignore
\quickwordcount{main}
\quickcharcount{main}
\detailtexcount{main}
%%TC:endignore

Custom-texcount.png

See the texcount documentation for what each runtime flag does. You can see these examples in action here.

"Words in headers" and "headers" in the section-by-section breakdown is for \section, \subsection etc but excluding the number 1, 1.1 etc.

"Word outside text" and "captions" in the section-by-section breakdown is for \caption, but excluding the prefix "Table 1" etc.

Note that each \citep{ddd} counts only as one word in texcount (which sort of makes sense; otherwise you can artificially bump up word counts tremendously by citing references with multiple authors). So \cite{faye1996}, although rendered as (Fay, 1996), is counted as one word by texcount but 2 words by other word processors.

And even

 \cite{benton_philosophy_2011,brown_epistemology_2005}.

which may render

 (Benton & Craib, 2011; Brown, Crawford, & Hicks, 2005).

would still be counted as 1 word.

If you need the citations to be counted a la Microsoft Word, then add also these lines in the preamble:

%TC:macro \cite [option:text,text]
%TC:macro \citep [option:text,text]
%TC:macro \citet [option:text,text]
% ... and for any other \cite commands you may use

To include words in tabulars and tables in the "words in main text" count, you can add these texcount instructions as well:

%TC:group table 0 1
%TC:group tabular 1 1


[edit] Further Reading

[edit] Overleaf guides

[edit] LaTeX Basics

[edit] Mathematics

[edit] Figures and tables

[edit] References and Citations

[edit] Languages

[edit] Document structure

[edit] Formatting

[edit] Fonts

[edit] Presentations

[edit] Commands

[edit] Field specific

[edit] Class files

[edit] Advanced TeX/LaTeX