Please check this on how to get queue items and yhe count based on status …
You can use get queue items with specific status with filter…but it gets only 100 at a time…so if more than 100 is expected then you need to perform this in loop to get all items
Cheers