# Beamer total slides counter?

Thanks to Change the page number of slides in notes when using | handout: command I can count the slides in a frame.

What I would also like is a counter for the total number of slides in a frame. Something like this:

\documentclass{beamer}

\makeatletter
\def\c@slideinframe{\beamer@slideinframe}
\makeatother

\begin{document}

\begin{frame}{Frame 1}
This is slide \arabic{slideinframe} of %here I'd like the total number of slides, 2 in this case
\pause
\end{frame}

\end{document}


Is it possible to have a counter for the total number of slides in a frame?

• Note that @KevinC's trick requires two passes. – jub0bs Oct 13 '13 at 9:45

To calculate the total number of slides in each frame, you can use

\insertframeendpage - \insertframestartpage + 1


Full Code:

\documentclass{beamer}

\makeatletter
\def\c@slideinframe{\beamer@slideinframe}
\makeatother

\newcounter{totalslideinframe}

\begin{document}

\begin{frame}{Frame 1}

\setcounter{totalslideinframe}{\insertframeendpage}