added new counter, fixed wrong page numbers for appendices