title: Counting divs without using class
body: <p>I am trying to count the number of gives in a group without using the class name:</p>
  
  <pre><code>&lt;div class="item" id="home1"&gt;home 1 text here&lt;/div&gt;
  &lt;div class="item" id="home2"&gt;home 2 text here&lt;/div&gt;
  &lt;div class="item" id="home3"&gt;home 3 text here&lt;/div&gt;
  &lt;div class="item" id="home4"&gt;home 4 text here&lt;/div&gt;
  </code></pre>
  
  <p>I have tried this</p>
  
  <pre><code>alert($(['id^="home"']).length);
  </code></pre>
  
  <p>But it keeps giving me 0</p>
  
  <p>Is there a more appropriate way of doing this?</p>