Try this:
To add an automatically updated page number:
Do one of the following to specify where the page-number marker appears:
If you want a page number to appear on all pages based on a master, double-click the master in the Pages palette.
If you want the page number to appear on a specific page only, double-click a page in the top half of the Pages palette.
On the master or page, position the type tool where you want a page number to be added, then drag to create a new text frame large enough to hold the longest instance of the page number and any text you want to appear next to the page number, such as the section marker or document name.
With a blinking insertion point positioned in the new text frame, do any of the following:
Type any text that you want to accompany the page number, such as the document name.
Use the Insert Section Name command to add custom section marker text, as explained in Defining section numbering.
Choose Type > Insert Special Character > Auto Page Number. If the automatic page number is on a master page, it displays the master page prefix. On a document page, the automatic page number displays the page number. On a pasteboard, it displays PB.