Edit note: The assoccnt package has a successor named xassoccnt which is extended compared to assoccnt. It incorporates some features that totcount provides too.
The package assoccnt can be used to step an associated counter each time another ('master') counter is stepped, regardless if the master counter is reset in between. In conjunction with totcount the task is easily solved, but don't reset (or change) the associated counter manually of course.
The reason why totcount itself can't do this is not totcounts fault. The \appendix command resets the chapter counter and after one \chapter in the appendix, the chapter counter value is 1, this value is written to the .aux file in the end, making totcount believe, there's only one chapter in the file finally.
assoccnt 'hacks' into \addtocounter{...}{} (the basic command behind \stepcounter or \refstepcounter and increases the driven counter simultaneously. This even works if the master counters are reset with chngcntr etc. or \@addtoreset features.
Basically any counter can be used as master counters and there might be more than one of them. In the end, each master counter can have many driven (associated) counters themself. (However, the page counter is little bit tricky!)
\documentclass{report}
\usepackage{totcount}
\usepackage{assoccnt}
\newtotcounter{totalchapters}
\DeclareAssociatedCounters{chapter}{totalchapters} % Associate the driven counter `totalchapters` to the master counter `chapter`
\begin{document}
There are \total{totalchapters} chapters.
\chapter{A}
\chapter{B}
\appendix
\chapter{C}
\chapter{D}
\chapter{E}
\chapter{F}
\chapter{G}
\chapter{H}
\chapter{I}
\end{document}

appendixresets the chapter counter – Sep 24 '15 at 18:35