Hello,
The getDocxProperties method returns the information from the XML properties in a DOCX document. These values are fixed and saved in the DOCX document by MS Word or LibreOffice (phpdocx doesn't change them), so if you read them directly they may not correspond with the real contents.
If you want to calculate the pages, lines and other values dynamically from a DOCX document you need to use the getStatistics method (https://www.phpdocx.com/api-documentation/format-conversion/get-Word-statistics-content). Please check the docs (macros-libreoffice since phpdocx 10) folder included in the package, where you can read all information about this method and how to use it.
You can get statistics too (not number of page/line values) using Indexer (https://www.phpdocx.com/api-documentation/docxutilities/indexer-parse-word-documents-with-PHP) or the getDocxPathQueryInfo method that only requires PHP: number of paragraphs, images, tables...
Regards.