Add unit test to ensure counters are calculated correctly.