Did you create page number text frames using the Current Page Number marker? That character is in the text contextual menu under Insert Special Characters > Markers. Inserting that character gives you automatic page numbering. You can put that marker on a document page or a master page.
On the subject of page numbering, whenever I have solid background colour on a page, it covers the auto page numbering which I set up on the master page. Is there a way of getting around this without having to put each page number individually on a page.