Not sure if this will help you but I noticed in the following http://help.arcgis.com/en/webapi/javascript/arcgis/jsapi/#FeatureLayer/queryIdsthe FeatureLayer.queryIds method will allow you to query for ObjectIds and there is no limit on the number of ObjectIds that are returned from the server. So the way I see it, it seems like you can get an array of all the OID that satisfy your query then you can process your array based on the number of records/oids returned. Once you have "parsed your array of OID into more "manageable" chunks then you can use the query.objectIds to get your selection graphics/features via either the query task or FeatureLayer.queryFeatures by passing in your "trimmed-down" version of the OIDs of interest. Loop through you list you get your data of interest. I hope that makes sense.