title: SQL get count(x) from y where theres a specific x
body: <p>How do I achieve a view in SQL for this? I want to get the number of books that exist in the shelf where book 2 is located. '2' is the book ID, and the book also has a shelf_id attributed to it. How do I find what shelf id it is and then search for how many books there are in it?</p>
  
  <pre><code>    SELECT COUNT(b.book_id)
      FROM book b, shelf s
  </code></pre>
  
  <p>I've tried a few things but am really not sure how to move forward.</p>