get count of div by class

JavaScript
var numItems = $('.item').length;
Source

Also in JavaScript: