I think I have found a bug in LibreOffice 126.96.36.199 that comes packaged with Ubuntu 16.04.
I have 21 pages in my document. I have set the first one, which is the index, to being a title page by Format-Title with no footer.
The next page that follows the title page has been set to start counting at 1. There are 21 pages in the entire document counting the title page. LibreOffice shows the second page as 1 of 22 instead of 1 of 21.
The pages number from 1 to 20 so, on the last page, you have Page 20 of 22.
I suggest it would be a good idea to review the whole matter of how a user specifies page numbering because, clearly, from all of the queries on this subject, the user interface in this regard is unsatisfactory.
Please don’t take this as a criticism. It is meant as a constructive suggestion. Further to this, I suggest a good, obvious place to put this would be in Format-Page-Numbering. At this point you could cover a lot of the variations and so make things easier for the user. Page numbering and page counting are a fairly important aspect of a written document and so I suggest this warrants an effort to correct what is a deficiency in the usability of LibreOffice Writer. (I say this because I appreciate you dear folk are most probably pretty stretched coping with your present workload and I’m sorry to add to it! )
Many thanks for your fantastic efforts.