title: Count(*) with 0 for boolean field
body: <p>Let's say I have a boolean field in a database table and I want to get a tally of how many are 1 and how many are 0.  Currently I am doing:</p>
  
  <pre><code>SELECT  'yes' AS result, COUNT( * ) AS num
  FROM  `table` 
  WHERE field = 1
  
  UNION 
  
  SELECT  'no' AS result, COUNT( * ) AS num
  FROM  `table` 
  WHERE field =  0;
  </code></pre>
  
  <p>Is there an easier way to get the result so that even if there are no false values I will still get:</p>
  
  <pre><code>----------
  |yes | 3 |
  |no  | 0 |
  ----------
  </code></pre>