Possible Duplicate:
JQuery – How do I count the number of elements selected by a selector?
I know you can determine if an object exists using var nextfooter = $('footer.newcontent')[0];
but using the same sort of syntax could I return the number of elements found?
You can use
$('selector').lengthor$('selector').size()