I woudn't use a script, I'd use relationships.
Make fields cat0, cat1, cat2, cat3, cat4, cat5, cat6 with the auto-enter data 0, 1, 2, 3, 4, 5, 6 respectively (or use global fields).
Then create relationships
cat0 --> cat0 = BCHD Unit#
cat1 --> cat1 = BCHD Unit#
etc
Finally, create calculation fields:
count_cat0 = Count(cat0::BHCD Unit#)
count_cat1 = Count(cat1::BHCD Unit#)
then just put those calculation fields on their own layout and you have realtime info. If you need to separate by quarter, you can adjust the relationships and the calculation fields to reflect that.
I can't post my revisions to your file, because I don't have stuffit here, but if you'd like, I can email it to you -- but I had to convert it to FM6.
HTH.
M.