What prevents you from doing the same yourself? Just collect the data in a memory buffer as you get it, before processing it.
Nothing but effiency as discussed. Basically, as Mr Cote has said, its either a count(*) query or O(n) step calls. The former means two statements have to be run, if this is a heavy statement its not that great. The latter is best option available, because as Mr Cote points out step isnt that heavy. The idea behind me prompting of this discussion is to get the best of both worlds. ie. the effiency of count(*) query without the need to execute two queries. At the end of the day its not serious as many work arounds/solutions are available.
That doesn't seem to make sense – after all, the count can only be returned *after* all the rows have been collected. By then you know the count yourself anyway.
But to return all the rows just to count them requires N calls to step. If the data set is large you only want to return a subset to start with. So you wouldnt know the count. If you dont know the count, you cant update GUI type things etc.. S