Inserts as a field the total number of pages in the document.
Choose Insert - Field - Page Count
The format of the field inserted using the Page Count command can be modified using the Edit - Fields command.