Count number of Divs filtering on id/class
<p>Hiii,<br>
<strong>Q-></strong>
I want to count the number of <code>div</code> in a page whose id start with d  </p>

<pre><code>&lt;div id="d1"&gt;D1&lt;/div&gt;
&lt;div id="d2"&gt;D2&lt;/div&gt;
&lt;div id="d3"&gt;D3&lt;/div&gt;
</code></pre>

<p>I want to get 3 here</p>

<hr>

<p><strong>Q-></strong>
I want to count the number of <code>div</code> in a page which have the class d  </p>

<pre><code>&lt;div class="d"&gt;D1&lt;/div&gt;
&lt;div class="d"&gt;D2&lt;/div&gt;
</code></pre>

<p>I want to get 2 here</p>
