title: SELECT COUNT(*) AS count - How to use this count
body: <p>Instead of doing: </p>
  
  <pre><code>$cars = $mysqli-&gt;query("SELECT * FROM cars");
  $count = $cars-&gt;num_rows();
  if ($count) {
    // is rows
  }
  </code></pre>
  
  <p>I want to not have to select all rows or a single column, I simply want the count.</p>
  
  <p>In my head:</p>
  
  <pre><code>$cars = $mysqli-&gt;query("SELECT COUNT(*) as count FROM cars");
  </code></pre>
  
  <p>But then how do I use that count value? I need to run an if statement on it.</p>