字符串可能是"",不应该计数。默认的count函数会统计""。所以先要把“”替换为NULL
select count(if(col0='', null, col0)), count(if(col1='', null, col1)) from table
或者
select count(nullif(col0, '')), count(nullif(col1, '')) from table
或者
select count(col0 != '' or null), count(col1 != '' or null) from table