How to query for getting aggregating count of variable in "Rules and Connectors"

Hi ,

Please help me in this regard, how to get the aggregated count of one variable by query in Rules.

Thanks & Regards,
Gireesh