Text/Insert/Total Pages
Choose this command to paste the number of total pages in the document to the text block you are editing or creating.
See Also:
Text Menu
Text Tool
Document Options-Text