in reply to How to fetch the size of the resultset from a DBI query?

$sth->rows is one way, but it is inconsistently supported in the various DBD's. Some will return a meaningful value before any fetches, some won't, and some don't support it at all, I think. The most reliable way is to count the records yourself as you're fetching them, or do a 'select count(*)...' before you do the main select (if you absolutely must know the count before you do the fetching, that is).