implemented MINCOUNT/MAXCOUNT for numeric types