The total number of results that come back is within the <rs:data> node. The attribute you want to get at is `ItemCount`. So you'll want to pull all of the items from the list, then count the number of `Complete` items. I'm doing this all from memory, so you may want to look at the response to see if this is all correct. Here's an example (totally not tested either...):
completefunc: function( xData, Status ) {var $xData = $(xData.responseXML), itemTotal = 0, totalComplete = 0, percentage = 0 ; itemTotal = $xData.SPFilterNode("rs:data").attr("ItemCount") * 1; $xData.SPFilternode("z:row").each(function(i, el) {var $node = $(this) ;if ( $node.attr("ColumnForComplete") === "Complete" ) { totalComplete++; } }if ( itemTotal !== 0 ) { percentage = totalComplete / itemTotal; } }
Cheers,
Matthew