def doQueryCount( dbid, query )
      @dbid, @query = dbid, query
      
      xmlRequestData = toXML( :query, @query )
      
      sendRequest( :doQueryCount, xmlRequestData )

      @numMatches = getResponseValue( :numMatches )

      return self if @chainAPIcalls
     @numMatches
   end
def doQueryCount( dbid, query )
      @dbid, @query = dbid, query
      
      xmlRequestData = toXML( :query, @query )
      
      sendRequest( :doQueryCount, xmlRequestData )

      @numMatches = getResponseValue( :numMatches )

      return self if @chainAPIcalls
     @numMatches
   end
API_DoQueryCount