Counting occurences of a drop-down list selection




I have a form with a table where the user enters name and function of each person. At the bottom, in a numeric field, I want to summarize how many times the function "Apprentice" was selected in the dropdown fields of my table. Any ideas on how I can count it?

I am using Adobe LiveCycle 8.

My table name is "Clocking", the dropdown filed name is "Function" and it is the second field on "Row1", so:


This is a dynamic table to which I can add or delete instances of "Row1".

I can post my form if you would tell me how to upload it to the forum.