title: SQL Count within a Select
body: <p>I would like to display a gallery of photos and how many times each photo has been rated.</p>
  
  <p>Here's my simply query but not sure how to get the Count from the Ratings table.</p>
  
  <pre><code>SELECT
     Photo.photoID
    ,Photo.photoName
    ,Member.memberID
    ,Member.memberFName
    ,Rating.ratingID
  FROM
    Photo
  INNER JOIN Member ON Photo.memberID = Member.memberID
  LEFT OUTER JOIN Rating ON Photo.photoID = Rating.photoID
  ORDER BY Photo.photoID DESC
  </code></pre>
  
  <p>Every time someone clicks the Star Rating buttons, a new record is inserted into the Rating table. I am only allowing a photo to be rated 100 times, therefore I would like to display the number of times a photo has been rated (i.e. 57/100) when the user is browsing the gallery.</p>
  
  <p>Appreciate your help!</p>