jquery len code example
Example 1: jquery count elements
var count_elements = $('.class').length;
Example 2: string length jquery
var string = "string"
string.length
Example 3: jquery li count in ul
$('#menu ul').filter(function(){ return $(this).children("li").length > 1 })