Ok I think you just want to use API_DoQuery instead of API_GetNumRecords. That will just return the total records of a table. An example is below though it's not tested. For Query or (q) in the code. You would place something like this given 25 is the field ID for a field called status and one of the values is Open
var q = "{25.EX.'Open'}"
$.get(dbidTracts, {
act: "API_DoQuery",
query: q,
clist: clist
}, function(xml) {
$("#openBtn").html("Open Tickets (" +xml.length + ")");
})
You're welcome to reach out directly if you have any questions with custom coding issues.
Chuck@Chuck.Support or if this solution resolves your issue and you're feeling gratuitous , chuck.support/donate
Take care and good luck!
_