My document has automatic page numbering enabled but the page count is incorrect.
This generally occurs when the document has multiple sections and the metadata in the sections is corrupted.