The following query has 2 Custom clause keys: SUM_AGG and AVG_AGG. FNC_TblOpGetCustomKeyCount returns 2 when called from the table operator or contract function associated with this query.
SELECT * FROM udaggregation ( on (select * from tab1) using SUM_AGG('A', 'B') AVG_AGG('C') ) as D;