nullwriter now keeps track of how many bytes were written