Can I count the number of elements with a specific attribute?
For example all the images with the src attribute test.gif
if you want to check the presence of the attribute only
$('img[src]').length //or .size()