function cm_query_total(data){
  jQuery.each(data, function(i,item){

    if(item.total==null){
      text = "no comments";
    }else{
      if(item.total==1){
        text = "1 comment";
      }else{
        text = item.total + " comments";
      }
    }
    
    jQuery("#cm-total_"+i).html(text); 

  });

}

/*
jQuery.getJSON('http://dev/comments/tp/cmquery/total_comments?callback=?'
*/