Obtenha filhos da JQuery
var count = $("#selected ul").children().length;
RedBredren
var count = $("#selected ul").children().length;