Borislav,
I'm trying to avoid 1) replicating the really complex query in two places (either SP_1Count and SP_1, or twice inside SP_1, 2) the work involved with a creating a #temp table with the structure of the complex query, 3) the wasted throughput sending the large first result set to the web server when only the count is wanted.
>How about in first SP:
>
>DECLARE @MyRowCount int
>SELECT @MyRowCount = SELECT COUNT(*)
>RETURN @MyRowCount
>
>Seraching for better method ...