After you have done your find and sort in your script, do this:
Go To Record  // this is the by calculation option
Omit Multiple Records [ No dialog ; Get ( FoundCount ) ]
Omitting more records than there are between the current record and the end of the found set just omits all records from the current record to the end of the found set.
Note that I am assuming one record per client. A more sophisticated looping script that scans your found set from top to bottom while counting clients would be needed in place of the Go to Record step if this is not the case.