There are several ways to get a summary total or other aggregate value from a set of related records. A summary field in PaymentAccounting can be placed on the Client layout to show the total of all records related to that client. Placed on the PaymentAccounting layout, it will show the same total if your current found set is the same. (May need to perform a find for the correct set of records.) You can also set it up as a running total summary field if you want to see how each record changes the total.
From the Client layout, you can also use a Calculation field in Client that uses the sum function or a summary field in a filtered portal to show a total of only the related records that meet the criteria specified in the portal filter.
Thank you Phil. I'm using two of your solutions. I had a summary field in PaymentAccounting, but I didn't want to filter to get the number. I have FM 10 so no portal filtering. Making an aggregate field in the Client table with the sum function of the QuantityMonths from the PaymentAccounting table works like a charm. I can place that in the rows of the portal. I can also place it in the rows of the list of all clients' payments in the PaymentAccounting table.
I'm also taking the QuantityMonths summary total from the PaymentAccounting table and placing it in the Clients table to show the total months paid by that client.