jquery li count in ul

JavaScript
$('#menu ul').filter(function(){ return $(this).children("li").length > 1 })
Source

Also in JavaScript: