title: How can I get the number of rows 'returned' from a result set of a stored procedure
body: <p>Is there a way to get the number of rows 'returned' from a stored procedure?
  I know the result set is not really returned so I can't select from it or count on it.
  I tried to use an out parameter but with no success..</p>
  
  <p>Basically I have some logic in the stored procedure that finds some table lines. I use it in my C# app. in another place I need the exact same logic but only the count so I will be able to use in an SQL statement.</p>
  
  <p>I could bring it to the C# and count there but I prefer not.
  I could also create a stored function that duplicate the logic but returns COUNT but I prefer not to duplicate so I don't maintain it twice..</p>