title: Select COUNT() from multiple databases in SQL
body: <p>I am attempting to return the number of customers located in a specific state that have rented a specific movie, where the rents table contains two columns, one for customer ID and one for the movie ID. The function takes in a movie ID and the state and returns an integer with the amount of customers.</p>
  
  <p>Right now I have an implementation, but it counts up the amount of rows the entire query returns:</p>
  
  <pre><code>SELECT COUNT(*) as numCustomers FROM CUSTOMER C, RENTS R WHERE C.ST = '" + state + "' AND R.mid = " + movieID
  </code></pre>
  
  <p>And then I count the amount of rows. I would like to just be able to check numCustomers for the correct data. Thanks!</p>