Add row count to csv writer