title: PHPword, get total number of pages
body: <p>I'm using <code>PHPword</code> to create a <code>docx</code> file.  I  need a method/function that can  get the total number of pages created.</p>
  
  <p>I know <code>PHPword</code> does support pages numbering which is easily done using <code>$footer-&gt;addPreserveText('Page {PAGE} of {NUMPAGES}.');</code></p>
  
  <p>once i got the total number of pages, i can create extra pages if the document has less the 20 pages.</p>