Added comparators to count the number of operations