title: Laravel query builder count
body: <p>I'm using Laravels query builder to retrieve a list of items with some filter options - I need to do a count inside of this query:</p>
  
  <pre><code>        $f = DB::table('Likes')
              -&gt;join('Freestyle', 'Likes.FreestyleID', '=', 'Freestyle.id')
              -&gt;join('Beat', 'Freestyle.BeatId', '=', 'Beat.id')
              -&gt;join('Track', 'Beat.TrackId', '=', 'Track.id')
              -&gt;join('Genre', 'Track.GenreId', '=', 'Genre.id')
              -&gt;select('Likes.freestyleID as likeFreestyleID', 'Freestyle.*', 'Beat.TrackId as UseMeForTrack',
      'Genre.id as GenreID')
              -&gt;where('Freestyle.Active', '1')
              -&gt;where('Freestyle.created_at', '&gt;', "$dateScope")
              -&gt;whereNull('Freestyle.deleted_at')
              -&gt;whereIn('GenreID', $request-&gt;genre)
          -&gt;first();
  </code></pre>
  
  <p>To count the amount of times the 'FreestyleID' appears in the likes table. </p>
  
  <p>is this possible? The data returned is perfect I just need the amount of likes a freestyle has, where the FreestyleID in the likes table is null.</p>