SELECT SUM(1) FROM (
SELECT COUNT(*)/2 FROM `work` WHERE `date_in` BETWEEN (SELECT UNIX_TIMESTAMP(NOW())+ 10740 SECOND) AND (SELECT UNIX_TIMESTAMP(NOW())+ 10800 SECOND) AND `kod`=0
UNION
(SELECT COUNT(*) FROM `work` WHERE `date_in` BETWEEN (SELECT UNIX_TIMESTAMP(NOW())+ 10740 SECOND) AND (SELECT UNIX_TIMESTAMP(NOW())+ 10800 SECOND)) AND `kod`>1 ))