title: AngularJs get count of element by class name
body: <p>How can I count element by class name in angularJs? </p>
  
  <p>I have tried with: </p>
  
  <pre><code>$scope.numItems = function() {
      $window.document.getElementsByClassName("yellow").length;
  };
  </code></pre>
  
  <p>Plunkr: <a href="http://plnkr.co/edit/ndCqpZaALfOEiYieepcn?p=preview" rel="nofollow">http://plnkr.co/edit/ndCqpZaALfOEiYieepcn?p=preview</a></p>