TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to put some formal statistics on the document itself somewhere in the middle, like "This document contains XXX figures and YYY tables (and may be even ZZZ formulas and PPP theorems)". Is there a common way to output the final value of some counter in the middle of the document?

Edited after answering: I have asked a more specific question before, "How to output the number of bibliographic entries referenced in the document?", which is now deleted because the answer to this one covers also this case.

For the reference, some useful counters, which can be used with totcount:

  • page - page count
  • enumiv - bibliography entries count
  • figure - figures count
  • table - tables count
share|improve this question
This is a question I had also and I never managed to answer. – Mlazhinka Shung Gronzalez LeWy Oct 6 '10 at 20:29
up vote 5 down vote accepted

Use the totcount package, perhaps?

share|improve this answer
Thanks, this works perfectly! – abbot Oct 6 '10 at 20:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.