Store counts for runs and tests

This commit adds count updates to both the run and test tables.
Before this commit the counts of test status in the run table and
test tables weren't ever used.