writes old counts to file