title: Fetch rows with count
body: <pre>
  --------------------------------------------------
  | UserID    |   Name        | RefID              |
  --------------------------------------------------
  | 1         | xyz           |  1                 |
  | 2         | abc           |  1                 |
  | 3         | def           |  1                 |
  | 4         | gij           |  2                 |
  | 5         | jkl           |  2                 |
  | 6         | mno           |  2                 |
  --------------------------------------------------
  </pre>
  
  <pre><code>$query = mysql_query("SELECT * FROM `users` WHERE UserID='$id' LIMIT 1 ");
  $query_ref = mysql_query("SELECT COUNT(ref) FROM `users` WHERE RefID='$id'");
  </code></pre>
  
  <p>Can these two queries be merged into one query?</p>