Implimented proper footnote counter