Pre-fetching row counts before query - performance
===

I recently answered this question based on my experience:

http://stackoverflow.com/questions/11642975/counting-rows-before-proceeding-to-actual-searching/11643053#11643053

but I'm not 100% satisfied with the answer I gave.  

The question is basically this: Can I get a performance improvement by running a `COUNT` over a particular query before deciding to run the query that brings back the actual rows?

My intuition is this: you will only save the I/O and wire time associated with retrieving the data instead of the count because to count the data, you need to actually find the rows.  The possible exception to this is when the query is a simple function of the indexes.

My question then is this: Is this always true? What other exception cases are there?  From a pure performance perspective, in what cases would one want to do a `COUNT` before running the full query?  