The metadata field will contain a number which indicates how many time
FirstPG has been found.
When you create it:
PlanetPress Talk ID: <your field name>
Level : Document
Fields : Value : 0,
Condition : =true
Create Action: Add value
On the
Press Talk Before of a form page that always execute, add the following Press Talk code:
if(regionline(0.24,4.05,1.19,4.27) = ' Page 1 of')
definemeta('NbFirstPGOccurences',inttostr(strtoint(GetMeta('NbFirstPGOccurences',10,'Job.Group.Document'))+1),0,'Job.Group.Document')
endif()
regionline() need to be replaced by your own data selection in your PDF for FirstPG.
' Page 1 of' need to be replaced by 'FirstPG'
NbFirstPGOccurence need to be replaced by your own metadata field
Basically, everytime that the string you are looking for is found,
definemeta changes the value that it got from
getmeta(), incremented by 1.