title: PHP MYSQL - Count & Average In Same Query
body: <p>This may be very simple but I am trying to do a query that will return the average of the results but I also want it to count the number of rows it used to get the average.  For example:</p>
  
  <pre><code>Row 1 = 5
  Row 2 = 2
  Row 3 = 9
  Row 4 = 1
  
  Average = 4.25
  Count = 4
  </code></pre>
  
  <p>Is there a way to do this with one query apposed to two.  When i used the avg function is always just returns one row so my count is 1 instead of 4.  I need a query that will average but also tell me how many records it went through.  </p>
  
  <p>I am trying to avoid using two queries.  Thank you for your help.</p>