Showing the total number of pages in addition to the actual page number is straight forward using the lastpage package.

\usepackage{lastpage}

Now you can simply access the number of pages using:

\pageref{LastPage}

Note: You will have to typeset the DVI/PDF twice in order to get the number right.

**Example:**

\usepackage{fancyhdr, lastpage}
\pagestyle{fancy}
\fancyfoot[C]{{\thepage} of \pageref{LastPage}}
\begin{document}
...

Note: See this recent comment on how to count the number of figures within your document.

### Like this:

Like Loading...

*Related*

Miguel V.

Hey! Wonderful blog! I have you in my feeds! I’m a TeX-lover!

I have only a minor suggestion. Perhaps you could also produce screen captures of your example’s results. It would be very illustrative…

Thanks, keep posting!

MV

nguyenminhhaivn

Hi. Do you know how AucTeX or LaTeX plugins for websites work? How can they extract small images contain formulas only?

Counting the total number of… « LaTeX Matters

[…] this posts for an example on how to display to the total number of pages in a document, e.g. Page 4 of 65. […]