title: mysql count from table where related record exist in other table
body: <p>I have 2 tables, customers and addresses.  I want to count how many customers have addresses with <code>name</code> like a given search term</p>
  <p>something like</p>
  <pre><code>SELECT COUNT(*) as countSearch FROM customers,addresses WHERE address.cu_id=customer.id AND customer.name like ?
  </code></pre>
  <p>Table Customers</p>
  <pre><code> ________________
  | id   |  name   |
   _________________
  |  4   |  john   |
  |  5   |  mark   |
   _________________
  </code></pre>
  <p>Table address</p>
  <hr />
  <pre><code>| id   |  cu_id   | address  |
   ____________________________
  |  1   |  4       | ADRESS!! |
   _________________
  </code></pre>