title: Count how many times a C function is executed
body: <p>There is this C function which is executed until area1/area2 are less than a defined constant. What I want to do is to find and return how many times this function is executed. Is there a way to return both the rate area1/area2 and the counter value?</p>
  
  <pre><code>double area(double x, double y) {
    x=......
    y=......
    if( (area1/area2) &gt; CONSTANT ) {
      area1 = area(x,y);
      area2 = area(x,y);
    }
    return area1/area2;
  
  }
  </code></pre>