In master pages insert two variables:
first on page and last on page (in the menu of this one define the source as «section»)
of course, your document must have sections to feed the last page information. your variables in the master must look like this:
«your name of variable first on page» 1 (it seems this number 1 is the code for the last page variable…)
you may separate this variables with a hyphen: «your name of variable first on page»-1
In each opening (chapter) section:
insert via menu: type/insert special character/markers/current page number in a little frame that must be placed outside the page but touching the bleed/slug menu. This text —tagged with a style already provided when the variable «first on page was defined»— will give the requisite of what you called first page (although is clearly first-on-page). The master page wiill be filled with this information, that is the beginning of a section with a new page.
Now, you simply must copy-paste this piece of text in the boundaries of each section (or apply no colour?) and you will have all sections really marked. You only need a master pagesv as the changes are determined by the little element in the page.
I do not know how to insert here a picture I made if you need more information.