In a SP, i fire a query to select the rows matching a condition.

Now i want to get the no of rows fetched? into a variable.

say i get 10 results...then i want this 10 to get stored in a variable?