title: How to select count with laravel
body: <p>I want to show the amount of data stored on the database tables using
  Laravel v 4.2.0  but i have a problem with using function count(). here's my code :</p>
  
  <pre><code>$total = DB::select("select count(*) from rents left join operators on operators.code = rents.code where (operators.code is null) and rents.booking = 'N'");    
  echo $total;
  </code></pre>
  
  <p>the message error say :</p>
  
  <pre><code>Syntax error or access violation
  </code></pre>
  
  <p>can anyone help me?</p>