SELECT `object_id` AS `id` , COUNT ( `object_id` ) AS `count` FROM `oc_comments` `c` WHERE ( `object_type` = ? ) AND ( `object_id` IN (...) ) AND ( `object_id` NOT IN ( SELECT `object_id` FROM `oc_comments_read_markers` `crm` WHERE ( `crm` . `user_id` = ? ) AND ( `crm` . `marker_datetime` >= `c` . `creation_timestamp` ) AND ( `c` . `object_id` = `crm` . `object_id` ) ) ) GROUP BY `object_id`