rowcount stores the number of rows that were located during an INSERT,
UPDATE, or DELETE statement, and is undefined during SELECT. the
"length" of a result set is generally not known until it is completely
fetched, as the database typcially starts returning rows over the wire
before it has even finished locating all rows (unless the results were
ordered or otherwise grouped in some way).
to get the length of a particular result usually entails either fully
fetching the result, or calling a separate select of "count()" with the
same criterion.