To get a count of agents, you can use this supportability metric
*SuperDomain*|Custom Metric Host (Virtual)|Custom Metric Process (Virtual)|Custom Metric Agent (Virtual)|Enterprise Manager|Connections|Number Of Agents
If you have a cluster, each collector will report that value so you could either report individual agent load per collector or make a sum of values using JavaScript calculator
If you want more details about the agents, like the names, you would need to use something like CLW:
https://docops.ca.com/ca-apm/10-5/en/using/apm-command-line-workstation/clw-command-reference#CLWCommandReference-IntroscopeAgentCommands