protected function countErrors()
    {
        $count = 0;
        foreach ($this->errors as $url => $errors) {
            $errors = array_filter($errors);
            $count += count($errors);
            $this->logErrors($url, $errors);
        }
        return $count;
    }