actually theThe results are returned in a GLuint, (also can be GLint for a different call) so unfortunately, the result is always a 0 or a 1, maybe they will change it looks like to me it does passregister frags in the number of fragments just like you wantfuture.
also it looks like not a single person on the entire internet has posted about these new extensions... so here they are set up properly...which is not documented anywhere as far as i can tell... you can imagine how they would go in your code from this little sudo code here:
import UIKit/UIKit.h
import GLKit/GLKit.h
import "GLProgram.h"
GLuint testBox,hasBeenTested,theParams;
//...
glGenQueriesEXT(1, &testBox);
glBeginQueryEXT(GL_ANY_SAMPLES_PASSED_EXT, testBox);
//... draw an object .......
glEndQueryEXT(GL_ANY_SAMPLES_PASSED_EXT);
glGetQueryObjectuivEXT(testBox, GL_QUERY_RESULT_AVAILABLE_EXT, &hasBeenTested);
if (hasBeenTested) glGetQueryObjectuivEXT(testBox, GL_QUERY_RESULT_EXT, &theParams);
glDeleteQueriesEXT(1, &testBox);
if (!theParams) object is hidden; don't draw next time;