If you require the number of rows at the output from the proc then try this:
create Procedure dbo.RecCount (@Table as nvarchar(100)) As
DECLARE @cntTotal varchar(10)
DECLARE @sql nvarchar(400)
exec sp_executesql @sql, N' @cnt varchar(10) output', @cnt=@cntTotal output
select @cntTotal
End