Hello Jose,
Well the most direct way would be to do a "SELECT COUNT(*) FROM AGTableSegment"
where AGTableSegment is the all the tablename of an Application Group.
exemple
SELECT COUNT(*) FROM ADA1
To find the active table segment:
SELECT AGID, TABLE_NAME FROM ARSSEG
or if you love better to see the actual name instead of the AGID:
SELECT DISTINCT A.NAME, B.TABLE_NAME FROM ARSAG AS A, ARSSEG AS B WHERE A.AGID=B.AGID
I hope this helps.
Cheers,
Alessandro