By reading the records and count them. As a datareader is specialized
for reading a result from start to end, there is no way of getting the
number of records in the result without reading them.
If you only want to know the number of records, you should use a count()
expression in the SQL query instead. That way you only get the
information you need in the result instead of a lot of data that you
don't use.