Write counters to job stats.