rename count to count_written and add count_created