I have a SharePoint 2010 web site with a master page that has a counter on it. I'm trying to update that counter using the ECMAScript. The code I have falls nicely into the success method - but I cannot find the right call to get a count. I have tried length, length(), count & count(). Does anybody have any suggestions? I have the code working, but only by enumerating through the results of the list and incrementing a count.

it appears from the above code that you have declared this.listItems inside your Initialize() method and not globally outside in the script. I believe you will find trouble in accessibg the same. Moreover this.listItems.length should work and give you the count.

What you're doing doesn't work. The condition is ignored and you get a count of every item in the list. Taking your code and the responses, this gets count by StatusID (tho it feels a lot like, just because Microsoft can't sell it if it has someone else's name on it, we're throwing out jquery's ajax and reinventing the wheel):