SELECT COUNT(DISTINCT(cms39_posts.mod_blog_cat_id)) as count FROM cms39_posts INNER JOIN cms39_postmeta ON (cms39_posts.mod_blog_cat_id = cms39_postmeta.module_blog_meta_rel_id) INNER JOIN cms39_postmeta AS mt1 ON (cms39_posts.mod_blog_cat_id = mt1.module_blog_meta_rel_id) WHERE cms39_posts.mod_blog_cat_date <= '2024-10-08 15:43:22' AND cms39_posts.mod_blog_cat_status = 1 AND 1=1 AND `mod_blog_cat_parent` = 284 AND ( mt1.module_blog_meta_key = 'render_popsocket-single-black' AND CAST(mt1.module_blog_meta_value AS UNSIGNED) IS NOT NULL ) AND mod_blog_cat_template = 'shopping' AND mod_blog_cat_type = 'shopping' ORDER BY mod_blog_cat_date DESC