You could make a cross reference to the last word on the last page of your book.
Then, in each file of the book insert a cross reference to that text anchor choosing "Cross reference Format" > "page number "
1 person found this helpful
If the "of y" is at a static point in the production process, I'd just work my way around the problem:
1) Go to the first document using the page numbering convention in the book. On the master page(s), if page numbering exists, change the current page number marker character to read --
[current page number marker] of y/[total number of pages].
2) Copy the tag with the updated information and paste it in the relevant master page(s) of the other documents in the book.
For me, if the page count isn't at a static point yet, I'd put off this part of the process to final production -- where I'm building the Table of Contents, indexing, etc. before the book goes out the door for final printing. But that's because I don't know of a way to script/automate the process. Perhaps somebody else can submit a more sophisticated solution than what I've offered here. Unfortunately, InDesign is currently designed to let you easily enter a prefix, but not a suffix, to expedite your page numbering convention.
All is not lost, though. Adobe developers are actively looking for new capabilities to add to the program. It may not exist today, but there's a way to submit a new feature request so it can help you, and others, down the line. If you'd like, click on the link below and ask the developers of InDesign to incorporate the feature in new versions of the program.
Hope this helps,