Added the automatic footnotecounter.