jQuery verifique cuántos elementos infantiles
var count = $("#selected ul").children().length;
Weary Wildebeest
var count = $("#selected ul").children().length;