Add write_count to headers