Count of currently active jenkins agents
You can sufix computer/ with api/json and run some script on this response. Count the computers array or group by some one of his attributes, like idle or offline.

https://www.myjenkins.com/computer/api/json