title: How can I count the number of records in a query that returns a very large dataset?
body: <p>I have a query that hits several tables and will return a large number of records.  However, I can't just scroll to the bottom and get the line number to see how many records there are.  How can I have it just return the number of records in a one line result?  </p>
  
  <p>I tried putting it all in a 'FROM' statement but that only errored...UPDATE Because the ";" was <em>inside</em> the last ")"...GAH!!!.</p>
  
  <pre><code>select T1.col-1, T1.col-2, T1.col-3, sum(T1.col-4), sum(T2.col-1), T2.col-2
  from T1, T2
  where T1.inedx-1=T2.inedx-1
  group by T1.col-1, T1.col-2, T1.col-3, T2.col-2
  order by T2.col-2
  </code></pre>