Question:
How can I get the number of records returned by a query without cycling through all the records and counting each one?
Answer:
Have you tried SELECT COUNT(*) FROM MyTable ? Alternatively, I think the number of rows is stored in sysxindexes.