title: How to get COUNT from stored procedure return?
body: <p>I have a stored procedure in SQL which I can't change. It needs few input parameters and returns a table with 100+ rows and several columns. </p>
  
  <pre><code>exec dbo.Select_Data 0, 0, 18, 50
  </code></pre>
  
  <p>I need something to get count of returned rows:</p>
  
  <pre><code>select count(*) from (exec dbo.Select_Data 0, 0, 18, 50)
  </code></pre>
  
  <p>and a way to get values from e.g. Name column:</p>
  
  <pre><code>select Id, Name from (exec dbo.Select_Data 0, 0, 18, 50) where Id=10
  </code></pre>
  
  <p>How do I do this?</p>