How do I count the number of rows a stored procedure would return the fastest way. Stored procedure returns rows around 100K to 1M records.
You can define output variable:
create procedure x (@p1 int output) as select @p1 = count(*) from Table