title: phantomjs/casperjs count DOM elements
body: <p>I would like to count the number of, let's say, div elements with 'nice' class. I've got the selector <code>div.nice</code>, but don't know which casperjs class/method to use.</p>
  
  <p>There is a <a href="http://docs.casperjs.org/en/latest/modules/tester.html#assertelementcount">tester.assertElementCount</a> method in fact, but is there anything that simply returns the number of elements?</p>