Count and write

COUNT AND WRITE