I would like to know how I can count the number of the comparisons made by the HeapSort I got on rosettacode? I tried to count it by adding a variable and each time the comparison method gets called this variable gets incremented. But somehow I dont get the right results. I think I have to override the comparison method somehow and use a getter and setter to increment a count variable. A hint will be highly appreciated...I would like to know how I can count the number