def count( dbid, fieldNames, query = nil, qid = nil, qname = nil, clist = nil, slist = nil, fmt = "structured", options = nil )
      count = {}
      fieldNames.each{|field| count[field]=0 }
      hasValues = false
      iterateRecords(dbid,fieldNames,query,qid,qname,clist,slist,fmt,options){|record|
         fieldNames.each{|field|
            if record[field] and record[field].length > 0
               count[field] += 1
               hasValues = true
            end
         }
      }
      count = nil if not hasValues
      count
   end
def count( dbid, fieldNames, query = nil, qid = nil, qname = nil, clist = nil, slist = nil, fmt = "structured", options = nil )
      count = {}
      fieldNames.each{|field| count[field]=0 }
      hasValues = false
      iterateRecords(dbid,fieldNames,query,qid,qname,clist,slist,fmt,options){|record|
         fieldNames.each{|field|
            if record[field] and record[field].length > 0
               count[field] += 1
               hasValues = true
            end
         }
      }
      count = nil if not hasValues
      count
   end
Returns the number non-null values for one or more fields in the records returned by a query.
 e.g. countsHash = count("dfdfafff",["Date Sent","Quantity","Part Name"])