Handy Hack:Perl DBI count rows returned from select statment

In theory it's a bad thing to assume a select will return a single scalar value instead of multiple attributes and rows, however with a count clause we should be pretty safe. N.B. using the $dbh->rows() function or similar is not correct on a select statement.
Modified after a suggestion from Randal. Thanks mate.