Query will return results but just want to count number of returned results and output on page

Feb 23, 2015 at 10:46 AM
My code will return my results but I just want to count the number of items returned I have tried a few things using itemCount but don't seem to be able to get this to work any advice would be greatly appreciated.
var CamlQuery ="<Query><Where><And><Eq><FieldRef Name='UpdateDate'/><Value Type='DateTime'><Today OffsetDays='0'/></Value></Eq><Contains><FieldRef Name='Departments'/><Value Type='Text'>Admin</Value></Contains></And></Where></Query>";
var CamlViewFields ="<ViewFields><FieldRef Name='Title' /></ViewFields>";

$(document).ready(function() {
  $().SPServices({
    operation: "GetListItems",
    async: false,
    listName: "Daily Updates",
    CAMLViewFields: CamlViewFields,
    CAMLQuery: CamlQuery,
    completefunc: function (xData, Status) {
      $(xData.responseXML).SPFilterNode("z:row").each(function() {
        var liHtml = "<li>" + $(this).attr("ows_Title") + "</li>";
        $("#tasksUL").append(liHtml);
      });
    }
  });
});</script><ul id="tasksUL"/>
Feb 23, 2015 at 12:41 PM
The number of records returned is the item count...
$(xData.responseXML).SPFilterNode("rs:data").attr("ItemCount")
Geoff