jQuery - If UL exists and how many LI
<p>Im looking for a way, in jQuery, to check if a UL exists AND if it does count the number of LI elements are contained within it.</p>

<p>The following jQuery loads a UL into a hidden DIV if there are new records to be fetched from the database:</p>

<pre><code>j(".refreshMe").everyTime(5000,function(i){
    j.ajax({
      url: "refresh.php?latest="+className+"",
      cache: false,
      success: function(html){
        j(".refreshMe").html(html);
      }
    })
});
</code></pre>

<p>If a UL is returned I want to count how many LI elements are in the list, then write that value to the page.</p>

<p>How can I achieve this in jQuery?</p>
