PDFDocument.PageCount

From Xojo Documentation

Read-Only Property (As Integer )
IntegerValue = aPDFDocument.PageCount

New in 2021r3

Supported for all project types and targets.

The number of pages in the document.