From the documentation:
Suppose you are merging docx1 and docx2, and showing page numbers or cross referencing to page numbers.
Unless docx2 explicitly restarts page numbering, the numbers will continue on from those in docx1.
You can make the page numbering restart with: blockRange2.setRestartPageNumbering(true);
If you are using page numbering of the form "page n of <total pages>" and you want <total pages> to reflect the number of pages in the relevant original document (rather than the number of pages in the resulting merged document), you should change your source documents so that they refer to <Total Number of Pages in Section>. See further http://support.microsoft.com/kb/191029
This will work provided each source docx has a single section. If the source documents have multiple sections, you will need to put a bookmark on the last page of each, and use a reference to that as the total number of pages.
Is that what you are asking? Feel free to email me at email@example.com
if you have any further issues/queries.
cheers .. Jason