Add test for checking CountsStore rotation

- expose total number of records written
- avoid returning a record if the count is zero