title: Get length of class with certain HTML
body: <p>I would like to know how many elements of the page with the class "test" contain the HTML "test123".</p>
  
  <pre><code>$('.test').html('test123').length;
  </code></pre>
  
  <p>Obviously this sets the html of every <code>.test</code>-Element  to "test123" which is not what I want...</p>
  
  <p>a workaround could be something like</p>
  
  <pre><code>var count = 0;
  $('.test').each(function(){
      if($(this).html() == 'test123'){
         count++;
      }
  });
  </code></pre>
  
  <p>But there has to be something simpler than that right?</p>