Wing,
You could use store the query in a dataset and then run QMF in batch with an initial procedure. That procedure would import the dataset as a query into QMF, which you could then run. You would probably need two queries, one to select the data and one to generate the count. QMF can do this, but needs forms to do so, and in the scenario that you have described, this does not seem possible.
DSNTEP2 appears to only output to 133, and according to the manual there is no way to override this. Have you run the REXX exec, as detailed on the Mainframe weekly site, as it looks to me that it is doing exactly what you are asking i.e. taking the DSNTEP2 output of 133 and reformatting it to a file of 4096 lrecl.
Marc