It's one of those "simple things" that don't have a simple way to automate in FileMaker.
Define a global variable: $$TotalPages if you have FileMaker 11. If you have an older version, define gTotalPages as a global field.
Write this script:
#Do this after going to the layout and finding the records you need for your report
Enter Preview Mode // clear pause check box
Go To Record/Request/Page [last]
#Filemaker 11 only:
Set Variable [$$TotalPages ; value: Get ( PageNumber ) ]
Set Field [YourTable::gTotalPages ; get ( PageNumber ) ]
Enter browse Mode
Then put either $$TotalPages or gTotalPages inside merge text on your layout. Be sure to run this script to update the field or variable with the total page count before you print or save a PDF of the report.