in reply to kickstarting a paged result set

You don't need to return all rows to find out how many rows there are. What's wrong with COUNT()? It's useful, it's handy, and it's standard. It returns one nice number that tells you how many items matched your query:

SELECT COUNT(*) FROM tablename;

One can also count by distinct values in a column, in case you don't want to show duplicates more than once. This would, in a hypothetical monthly log of purchases on an ecommerce site, tell you how many different customers made purchases no matter how many items they bought or how many separate times they checked out:

SELECT COUNT(DISTINCT customer_id) FROM purchases;

When you're working with both Perl and some other language, it helps to see if the other language addresses your needs. In this case, SQL could save your server quite a bit of data transfer and memory usage.