Number of users in a given resource

Hi , i’; implementing a team based approach to manage resources as workspaces using keycloak, i need a way to get the number of users that share a resource.

i m looking for some kind of Rest endpoint to do the job with the id or the name of the resource as parameter.