0
Get Count Using GlideAggregate ServiceNow or Counting records with GlideAggregate 
/Find all active incidents and log a count of records to the system log
var in= new GlideAggregate('incident');
in.addQuery('active', true);
in.addAggregate('COUNT');
in.query();
var incidentCount = 0;
if (in.next()){
incidentCount = in.getAggregate('COUNT');
gs.log('Incident Count= ' + incidentCount);
}
How to get Count Using GlideAggregate ServiceNow
admin Changed status to publish December 19, 2023