title: how to count items on laravel query?
body: <p>i need to count hours. this is my laravel eloquent:</p>
  
  <pre><code>$items = Item::ofType('type')-&gt;where('start_at','&gt;=',Carbon::today())-&gt;groupBy(\DB::raw('HOUR(start_at)'))-&gt;count();
  </code></pre>
  
  <p>And this is show me results like 2/2/1</p>
  
  <p>sql query of this:</p>
  
  <pre><code>SELECT
      count(*)AS AGGREGATE
  FROM
      `items`
  WHERE
      `type` = 'type'
  AND `start_at` &gt;= '2015-10-15 00:00:00'
  GROUP BY
      HOUR(start_at)
  </code></pre>
  
  <p>And how to count 2/2/1 of this and get result = 3?</p>
  
  <p>I need laravel eloquent without RAW.</p>
  
  <p>EDIT:</p>
  
  <pre><code>SELECT COUNT(*) FROM (SELECT
      count(*) AS AGGREGATE
  FROM
      `items`
  WHERE
      `type` = 'type'
  AND `start_at` &gt;= '2015-10-15 00:00:00'
  GROUP BY
      HOUR(start_at)) as count
  </code></pre>
  
  <p>how to write this in laravel eloquent?</p>