I want to use totcount to get the number of parts and chapters in my document. To get the correct number of chapters in the presence of appendices, I use assoccnt (see totcount gives wrong chapter count when appendices present). At the same time, I need to use calc for reasons that are not important for this question. When both assoccnt and calc are used, the chapter count is incorrect. With calc commented out, the chapter count is correct. The order of the usepackage commands is immaterial. How can I keep using calc but get assoccnt to work properly?
MWE:
\documentclass{book}
\usepackage{totcount}
\usepackage{assoccnt}
\regtotcounter{part}
\newtotcounter{chaptertot}
\DeclareAssociatedCounters{chapter}{chaptertot}
\usepackage{calc}
\begin{document}
There are \total{part} parts and \total{chaptertot} chapters.
\part{I}
\chapter{A}
\chapter{B}
\part{II}
\chapter{E}
\chapter{F}
\appendix
\chapter{C}
\end{document}

calcdoes some 'weird' things I had not in mind when I wroteassoccntabout one year ago. I've to do some redesign, perhaps I can get this done today. I had a rewrite in mind usingexpl3for the future. – Sep 27 '15 at 09:22