protected function getCountForModel($modelClass)
    {
        if ( ! is_a($modelClass, Model::class, true)) {
            throw new UnexpectedValueException("'{$modelClass}' is not an Eloquent model class.");
        }

        return $modelClass::withoutGlobalScopes()->count() ?: 0;
    }