Append total count to file