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;
    }
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;
    }
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 ; }
Returns total count for a model classname.

@param string $modelClass
@return int
Returns total count for a model classname .