title: mysql show Count of rows from other table in each row
body: <pre><code>select `personal`.`id` AS `id`,
  `personal`.`name` AS `name`,
  (select count(visit.id) 
        from visit,personal 
          where visit.user_id=personal.id) as count 
  from personal;
  </code></pre>
  
  <p>im trying to get all users and the counts of visits they did.</p>
  
  <p>the result i get is all users but the count column contain same value (not specific to that row id).</p>
  
  <p>what am i doing wrong here ? how to tell mysql to user this row id ?</p>
  
  <p>is compound select optimum way to do it or is there a better way ?</p>