title: count and fetch rows in php
body: <p>i have a table in my mysql database named  (names)  now everyone can save their real names </p>
  
  <p>now i want to query this table and find out how many times these names used </p>
  
  <p>forexample the output should be  : </p>
  
  <blockquote>
    <p>Jakob (20)   Jenny (17)</p>
  </blockquote>
  
  <p>now this is my own code :</p>
  
  <pre><code>    list($usernames) =mysql_fetch_row(mysql_query('SELECT name FROM table_user GROUP BY name ORDER BY COUNT(name) DESC LIMIT 50 '));
      list($c) =mysql_num_rows(mysql_query('SELECT COUNT(name) FROM table_user GROUP BY name '));
  
      print $usernames.'('.$c.')'
  </code></pre>
  
  <p>is this a correct approach ?!</p>