/**
  * {@inheritdoc}
  */
 public function count()
 {
     if (null === $this->count && $this->file) {
         $length = $this->length;
         $this->length = 0;
         $this->count = parent::count();
         $this->length = $length;
     }
     return $this->count ?: 0;
 }
 /**
  * @depends testCurrent
  */
 public function testHeaderRowNumber(CsvReader $reader)
 {
     $reader->rewind();
     $this->assertEquals(0, $reader->key());
     $this->assertCount(17, $reader);
     $reader->setHeaderRowNumber(1);
     $reader->rewind();
     $this->assertEquals(1, $reader->key());
     $this->assertCount(16, $reader);
     return $reader;
 }