If all the pages have the same code in the footer you can highlight the code that is the same (it has to be exactly the same), then hit ctrl+f (find).
From here you can a find & replace within the entire current local site. If you have an identical chunk of code on every page, then replace that code with the same thing + the counter.