在存储过程中,怎么得到这个存储过程中的某个结果集的个数

在存储过程中,如何得到这个存储过程中的某个结果集的个数。
在存储过程中,如何得到这个存储过程中的某个结果集的个数(此结果集是要返回给调用者的)。

例如:

declare   @count   int
select   @count=0

select   *   from   t   where   id <10       //它是要返回给调用者的

//select   @count=count(*)   from   t   where   id <10   --我当然不想用这种办法得到@count的值


------解决方案--------------------
@@rowcount 跟在操作语句后