Perform the following steps:
Open a FrameMaker book file
From the menu choose
FINALYSER>Book Services>Last Page NumberConfirm the opening window with
OKIn the book, open a file and go to the master page
Via
Special>Variables insert the generated user variable "SQUIDDS_Number_Of_Pages" in the header or footer
The total number of pages is now displayed on the body page.
Via
Import Formats>Variable Definitions the variable can be imported into all other documents of the book.