How to force count value to update when table is updated?

I have a scene with a table in it and a form and a details view...

I am attempting to validate using javascript the number of records in the table. I have added a count field to the master record that contains the count of the current table. So far so good..

To access the count value I added a details view with that value on it, but using css I set the visibility: hidden, so that I can access the value.. So far so good..

However, when I delete a record from the table, the details view does NOT get updated. So it ends up with the incorrect value for the count.. The record has the correct count, but the view does not.

Any thoughts on how to either get around this, or to do this better?

What I'm attempting from a logical perspective is as follows:

I have a table of lawyers.

I have an input form below it, that has a set of categories, the total of all of them has to add up to the total records in the lawyers table.

On the form submit, I run a javascript to compare the total of the categories to the count in the lawyer table. If it doesn't match a popup error is displayed, and the submit is not allowed..

Any thoughts?