title: Why aren't nulls counted in COUNT(columnname)
body: <p>So I came across something the other day at work, trying to count how many null values after running an import.</p>
  
  <p>So, I did:</p>
  
  <pre><code>select COUNT(columnname) from table 
  WHERE ColumnName is null
  </code></pre>
  
  <p>Which didn't count the nulls...</p>
  
  <p>Then I did,</p>
  
  <pre><code>select COUNT(*) from table 
  WHERE ColumnName is null
  </code></pre>
  
  <p>Which gave me the count.</p>
  
  <p>So, something that bugged me is why exactly this doesn't count the null values.</p>
  
  <p>I have looked at this question (along with a good search around Google...): 
  <a href="https://stackoverflow.com/questions/59294/in-sql-whats-the-difference-between-countcolumn-and-count?lq=1">In SQL, what&#39;s the difference between count(column) and count(*)?</a>,
  and whilst it tells me that <code>COUNT(columnname)</code> doesn't count nulls, I would like to know exactly <strong>why</strong> nulls aren't counted using this method?</p>
  
  <p>Many Thanks,
  James.</p>