Not sure if you need this, but we do this but we count the agents with the specific skills since some of our queues have "all skills matching" set. I'm attaching our data action. In my use case, we do a count prior to sending the call to the queue. If 0 agents, we send SMS alerts to the queue manager. That way they can take immediate action. In some cases we flow out to a different queue.
Here is a snippet of the count we do to route in the flow.

------------------------------
Ryan Cheesman
Senior Manager, IT Integration Services
Tandem Diabetes Care Inc. | positively different
------------------------------
Original Message:
Sent: 01-19-2023 05:49
From: Shenbagamoorthy B
Subject: How can I get Number of user logged in the specific Queue
Dear All,
I am trying below Genesys Cloud API For Get available Presence Users.
/api/v2/routing/queues/{queueId}/members?expand=presence&presence=Available
But I want to get all logged In Users count in the specific Queue instead of Available Presence. Please Any one Assist me on this.
Thanks & Regards
Shenbagamoorthy B
#ArchitectureandDesign
#Integrations
#Routing(ACD/IVR)
#GenesysCloudCXQAEpisode
------------------------------
Regards,
Shenbagamoorthy B
TechLead
Pointel Inc.,
------------------------------