[sql] Counting null and non-null values in a single query