public function count()
    {
        $handle = $this->createHandle($this->getFilePath());
        $lineCount = 0;

        while (!feof($handle)) {
            $line = $this->readLine($handle, null);
            if ($line !== '') {
                ++$lineCount;
            }
        }

        fclose($handle);

        return $lineCount;
    }