The TAdvPDFLib does not know how many pages are added because everyting happens dynamically, so to know how many pages you have, you will need to calculate the pages before adding them and then use this number as a indicator of how many pages there are. There is no solution built in to retrieve how many pages there are and add a page number afterwards. When a new page is added, the current page is finished and there is no drawing allowed.
We'll add this on our feature request list, but it's unclear if this will be possible, as the content is always provided by the user which is dynamic and unknown at the time of creating the pages. We'll explore the possibilities.