returning the number of columns in a row that are zero in mysql
The easiest way is to sum negated values:

SELECT datetime, (!a) + (!b) + (!c) + (!d) AS zero_count
  FROM table
. . . . 


Operator ! returns 1 if operand is 0, 0 if operand is non-zero, and NOT NULL if operand is NULL.

Parenthsis added because adding + have higher precedence over negation.