What is the purpose of having 10 to 25 layouts? If you can simplify your system design so that you get the same report from one or a few layouts, this process is easier to work with and to maintain.
You can use a global field for the total pages and the page number can be a calculation that combines the current page number (specific to the current layout) with a global field that stores an "offset" equal to the number of pages printed on previous layouts in the same report.
Here's a script that counts the total number of pages from a given layout.
#First perform a find, sort records etc. to produce the needed found set and sort order for your report
Enter Preview Mode 
Go To Record/Request/Page [Last]
Set Field [YourTable::gTotalForLayoutXXX ; Get ( pageNumber )]
gTotalForLayoutXXX would be used to store the pages needed for one layout and this gives you what you need to compute both total pages and the "offset" needed to produce the correct current page.
Get ( PageNumber ) + Yourtable::gLayoutXXXOffset
might be the field you define and use for the current page number.
Note fields named with a g as the first letter should have global storage specified in field options in order for this process to work.
I would like to thank for your time in responding so fast to my post. I cant seem to get the script to work for my solution. I can count the pages for one Layout but I have 10 to 25 Layout for Reports, my Report can be from 25 to 250 pages with over 100 photos. I need a Page count dilplayed on the footer of each page with the total (Sample "Page 1 of 21" or "Page 7 of 21" for a Small report and "Page 1 of 155" or Page 133 of 155"
I have only been working with FileMaker 11 Adv for a yera or so and would like any halp you can give.
It's not a simple process. That's why I've asked why you need so many different layouts.
You'll need separate sets of fields or variables in which to store the page counts for each section. The total of these counts gives you the right hand number. Sub totals, different for each layout, produce the "offset" values needed so that current page number plus offeset produces the left hand number. (Fields in the footer should take their values from the last record on that page, so this should work for you once you get all the pages counted.)
Note that for any layout where you always have exactly one record for each page, you do not have to use this method, you can simply use Get ( FoundCount ) to get the total pages for that layout.
I know it's not a simple task. I have spent 9 hours on it and still can't get the page numbers to work.
Can you nplease write me a simple step by step for 3 or 4 pages. If not can you tell me who I can call to do so ?
I am willing to pay a fee for the script and any help in this matter.
Thanking you in advance for your help :)
Say you have two layouts. We'll use that and hope you can then generalize the approach to your 25 layout report.
Define a calculation field,cPageNumber, in the table for layout #2:
Get ( PageNumber ) + Globals::gOffset.
Globals is a separate table just for global fields. You don't have to use that, but it's handy to keep all your global fields in one place. gOffset should be defined as a field of type number and global storage should be specified in field options for it.
Define a second global field: gTotalPages to count the total pages in your entire report.
Now use this script to give gOffSet and gTotalPages the values that they need. I can't spell out all the details as I do not know how your reports are designed so you will need to fill in some details yourself:
Go To layout [Layout 1]
#Perform a find to pull up the records you need for this report
#Sort the records as needed for this report if you use sub summary layout parts
enter preview mode  //clear the pause check box
go To Record/Request/Page [last] //go to last previewed page
Set Field [Globals::gOffset ; get ( PageNumber ) ]
enter browse mode
Go to Layout [Layout 2]
#Sort if needed
Go To Record/REquest/Page [last]
Set Field [Globals::gTotalPages ; Globals::gOffSet + Get ( PageNumber ) ]
That's it for two layouts. Now put:
## of <<Globals::gTotalPages>>
on your first layout and put:
<<cPageNumber>> of <<Globals::gTotalPages>>
on your second layout. Fields in << >> are called merge fields and you can use the Insert menu to add them to your layout.
To extend this method to three layouts, you'd need to add an offset field for the third layout that combines Globals::gOffSet1 + get ( PageNumber) to get a calculated page number for your third layout and the pattern would continue from there...
I do have one more little thing.
I Print Photos (Container Field's 1-150) with my Reports; I have the Fields sliding up to reduce the pages printing,
Any SIMPLE way to Stop Page Breaks across the Photos ((Container Field's 1-150))???
150 container fields? !!!!
Looks like you may not have the optimum table structgure here. Instead of 150 fields, you would be better off with a related table of image records that could then have 0 to 150+ related records for a given report.
With that approach you might be able to set up a layout with one container field in the body (but many records), and then you can specify that the body layout part not break across page boundaries.
I rather suspect that many such design changes to the structure of your data could be made and that these changes would also reduce the number of layouts needed for your report. 25 layouts for one report is really extreme. Almost always, a single layout is all you need for a given report. There are cases where that just isn't possible and then you may find that more than one layout is needed to produce your report, but 25 layouts seems really out there...