protected function countGitChangesPerFileRange(Project $project, $file, $from, $to)
    {
        $options = [
          'log',
          '--format=format:qacommit: %H',
          '--no-patch',
          '-L',
          "$from,$to:$file",
        ];

        $existingResults = $this->shell->exec('git', $options, [0], $project->baseDir);

        return count(
            array_filter(
                array_map(
                    'trim',
                    explode(PHP_EOL, $existingResults)
                ),
                function ($line) {
                    return (strpos($line, 'qacommit: ') === 0);
                }
            )
        );
    }