title: display title and count how many times the title is in the database
body: <p>sorry about my english.</p>
  
  <p>Ok, so what i want to do is make a table like this:</p>
  
  <pre><code>nr | title  
  2  | boop  
  4 | beep  
  1 | apples
  </code></pre>
  
  <p>the # row displays how many times the title on its right is in the table.</p>
  
  <p>there are two tables: probleem (where a thema_id is placed every record), thema (where the theme title and id's are defined).</p>
  
  <p>i've got the following code:</p>
  
  <pre><code>$themagetal = mysql_query("SELECT * FROM probleem INNER JOIN thema ON probleem.thema_id = thema.thema_id ORDER BY probleem_id ASC");
  
  while($vet = mysql_fetch_array($themagetal)){
      echo $vet['thema_id'] . ' ' . $vet['thema_tekst'] . '&lt;br/&gt;';
  }
  </code></pre>
  
  <p>So i've read somewhere that i can use a count() to count the records. The problem is that i don't know how to use the count() without putting a mysql query in the while loop. i know that that's not really acceptable. how do i make that work?</p>