Number of distinct values for a given field in a query?