Optimized count, count_if, min_element, max_element, transform_reduce