This is a very interesting problem, and unfortunately there are no effective solutions (by effective I mean reliable or fast).
In thinking about this problem a little while ago, I thought of a few potential solutions. One would be to run the same query with a count(*) instead of the actual columns - this would give you the number of rows. Then immediately following that query you would perform the actual data query, returning you the row details. However, this poses a big problem if many transactions are performed on the table(s) in question, as the data in the table(s) could conceivably change between the count(*) query and the second query. Thus, not "reliable".
Another solution would be to select rownum in your SQL statement (as part of the whole query). Then, you could do a last() call on the ResultSet (moving the cursor to the last row), pull the last rownum column, and then jump back to the beginning of the ResultSet by calling first(). However, this operation will iterate over the entire ResultSet, row by row, which will be extremely slow if the number of results being returned is large. Thus, not "fast".
If anyone else has solutions that they've seen work for this type of operation, please send them along.
Best,
Adam