Counting table row tags in text
<p>I'm trying to count how many starting table row tags <code>&lt;tr&gt;</code> that would be in the following text. Keep in mind that I said text, not html. I get this data back in a textarea (don't ask) and I need to count how many starting tr tags are in this textarea. How would I do that? Whats the appropriate method in jquery to achieve this?</p>

<pre><code>&lt;textarea name='details' id='details'&gt;
    &lt;table&gt;
    &lt;tbody&gt;
    &lt;tr&gt;
    &lt;th&gt;&lt;/th&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
    &lt;th&gt;&lt;/th&gt;
    &lt;/tr&gt;
    &lt;/tbody&gt;
    &lt;/table&gt;
&lt;/textarea&gt;
</code></pre>
