How do I count how many span of the same id on my page?
<p>I have this html code:</p>

<pre><code>&lt;span id="post"&gt;&lt;/span&gt;
&lt;span id="post"&gt;&lt;/span&gt;
&lt;span id="post"&gt;&lt;/span&gt;
&lt;span id="post"&gt;&lt;/span&gt;
&lt;span id="post"&gt;&lt;/span&gt;
&lt;span id="post"&gt;&lt;/span&gt;
&lt;span id="post"&gt;&lt;/span&gt;
&lt;span id="post"&gt;&lt;/span&gt;
&lt;span id="post"&gt;&lt;/span&gt;
&lt;span id="post"&gt;&lt;/span&gt;
</code></pre>

<p>I want to count how many spans are there with the <code>id="post"</code> in my page. when I tried to use <code>.length</code> and <code>alert</code> I got <code>1</code>
what is the way to do this ?</p>
