added CountingReader, CountingWriter, CountingReadWriter