You'd need to run this on the drop
event of the droppable - assuming jQueryUI droppable, something like this would work:
$('#sortable1').droppable({
drop: function(event, ui) {
var liCount = $("#sortable1 li").length;
// do something with liCount...
}
});