Loop thru line breaks and count lines?
<p>I have a string such as the one below.  I want to loop thru each line (lines are separated by <code>&lt;br /&gt;</code>) and count total lines.  How can I do this?</p>

<pre><code>This is line 1 &lt;br /&gt;
And Line 2 &lt;br /&gt;
And and line 3! &lt;br /&gt;
</code></pre>

<p>My output should be 3</p>
