my ($count) = $dbh->selectrow_array( 'SELECT count(*) FROM table' );