Zend certified PHP/Magento developer

Combining two sections page numbers in a document with more than two sections

I have a document with at least 5 sections. I am using a page x of y pagination system. I would like sections 1 & 2 to read pagination-wise as if they are 1 section, e.g., page x of y where x is the page number for the current number of the page in sections 1-2 and y is the total number of pages in sections 1-2, but where sections 3-z restart and are only page x of y for the current section. I have been unsuccessful thus far in linking or using formulae (albeit, I am rather unsophisticated when it comes to formulae in MS Word).