write some counts to file