Just use count() :
select count(field1), count(field2), count(field3) from table t;
This is what count() does - it counts non-null values.
If you have an aversion to typing names, use metadata tables (usually information_schema.columns ) to get the column names. You can generate SQL as a query or copy the column names into a spreadsheet to generate code.
EDIT:
You can generate the code using:
select group_concat('count(', column_name, ')' separate ', ') from information_schema.columns where table_name = <whatever> and table_schema = <whatever2>;
Note that the little-known ability of group_concat() to accept multiple string arguments is used.
source share