The question is simple enough: How can I make the following output of my counter (\themycounter) say 6?
\documentclass{article}
\newcounter{mycounter}
\newcommand{\myitem}{\refstepcounter{mycounter}}
\begin{document}
I have some reason to tally up some items here\myitem \myitem \myitem.
But how many items are there in total in this document?
Are there {\themycounter} items?
Surely there are more since I am tallying up some more items now\myitem \myitem \myitem.
\end{document}
I'm quite confident that the answer doesn't need to be as complicated as the one given in Displaying a later value of a counter (which is why I'm taking the liberty to ask here).


totcountpackage, so this thread is definitely to prefer over the original. – Sverre Sep 10 '13 at 20:00\label, which has to be placed after the last\myitemfor it to work). Even you could cast a vote-to-close if you feel that one of the mentioned posts are duplicates. – Werner Sep 10 '13 at 20:08