InDesign allows you to add a page number marker to a master page within the document. The master page functions as a template for every page it's applied to, so the consecutive page numbers appear on every page. InDesign updates the page number automatically as you insert, delete and move pages. To add a page number marker to a master page, create a text box on the master page by going to the Type menu and choosing "Insert Special Character," "Markers" and then "Current Page Number."
A best practice that we recommend to our clients is to create a base/folio master –with styled and positioned footers and current page number special characters– on which all other masters are based. This allows a footer that may contain date or issue information to be updated once and the changes are reflected in all of the master pages. If your masters only have current page number special characters then you can just add them to each master and the page numbers will be reflected when each master is applied to your document pages. document numbering in indesign