How to count results from For Loop : <p>How do we count results from For Loop </p>

<pre><code>$starting_year=2001;
$ending_year=2015;

for ($x = $starting_year; $x &lt;= $ending_year;$x++) {
    echo "$x &lt;br /&gt;";
} 
</code></pre>

<p>how do I count the generation? For example above should be 5</p>
