title: count number of rows associated with their id in another table
body: <p>Hi We have 3 Table of a music which is something like this in MySql :</p>
  
  <p><strong>1st Table :</strong></p>
  
  <p>the first table is for <code>playlist</code> table where music playlist is exist.</p>
  
  <pre><code>playlistId           playlistTitle          categoryId
  
  1                    hello                  0
  2                    wow                    0
  3                    wi-fi                  0
  4                    awesome                0
  5                    sixer                  1
  6                    four                   1
  7                    boundary               2
  </code></pre>
  
  <p><strong>2nd Table :</strong></p>
  
  <p>2nd table is for <code>songRelation</code> table where every playlist is associated with thier song</p>
  
  <pre><code>playlistId            songId
  
  1                     4
  1                     3
  1                     43
  1                     57
  1                     98
  2                     56
  2                     67
  2                     90
  2                     78
  3                     98
  3                     78
  3                     89
  43                    90
  </code></pre>
  
  <p><strong>3rd Table :</strong> the 3rd table is for <code>song</code> table where song detail exist</p>
  
  <pre><code>songId                songTitle
  
  4                     hello
  3                     real hero
  43                    singalone
  57                    awesom
  98                    really
  78                    sakaka
  98                    shikwa
  89                    moha
  90                    hello2
  67                    Sneh
  </code></pre>
  
  <p>actually i am fetching the result something like this:</p>
  
  <pre><code>playlistId  songId    categoryId songTitle
  
  1           4         0          hello
  1           3         0          real hero
  2           56        0          singalone
  2           67        0          Sneh
  3           78        0          sakaka
  3           98        0          Shikwa
  </code></pre>
  
  <p>where the every <code>playlistId will be with their first 2</code>songId<code>and with their</code>categoryId<code>and also with</code>songTitle`.</p>
  
  <p>but i want to count the total <code>song</code> with every <code>playlistId</code></p>
  
  <p>after getting the total song result i want will be something like this :</p>
  
  <pre><code>playlistId  songId    categoryId songTitle       totalSong
  
  1           4         0          hello           5
  1           3         0          real hero       5
  2           56        0          singalone       4
  2           67        0          Sneh            4
  3           78        0          sakaka          3
  3           98        0          Shikwa          3
  </code></pre>
  
  <p>here is the jsfiddle Demo where query is without <code>totalSong</code> <a href="http://sqlfiddle.com/#!9/7eda7/5" rel="nofollow">http://sqlfiddle.com/#!9/7eda7/5</a></p>
  
  <p>What subquery will be added to get the above desired result.</p>