How to check whether document is not null and count greater than 0

how to check whether document is not null and count greater than zero using aspose.words?

Hello
Thank for your inquiry. You can use PageCount, please see the following link:
https://reference.aspose.com/words/net/aspose.words/document/pagecount/
Best regards,