one of the documented procedures in this installation of the ACS
ad_user_class_query_count_only   selection
What it does:
Takes an ns_set of key/value pairs and produces a query that will compute the number of users in the class specified.
Defined in: /web/philip/packages/acs-core/admin-procs.tcl

Source code:

    set new_set [ns_set copy $selection]
    ns_set put $new_set count_only_p 1
    return [ad_user_class_query $new_set]