Sometimes tex files need to compiled two or more times to get all references correctly. It can be table of contents or "totcount" package or navigation buttons in Beamer package. Auctex does not always detect this need. Specifically my "totcount" counters and Beamer navigation changes don't trigger re-compile. Is there a way to configure this? Maybe using an external script for compiling?