protected function countJobsByType($type)
    {
        $minutes = $type === 'failed_jobs' ? $this->failedJobExpires : $this->recentJobExpires;

        return $this->connection()->zcount(
            $type, '-inf', Chronos::now()->subMinutes($minutes)->getTimestamp() * -1
        );
    }