select count(p.products_id) as total from products p, products_description pd, products_to_categories p2c, TABLE_CATEGORIES_STORES cs, manufacturers m left join specials s on p.products_id = s.products_id where p.products_id = p2c.products_id and p2c.categories_id = cs.categories_id and cs.categories_storename = 'GLOBAL_CURRENT_STORE_NAME' and p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '1' and p.manufacturers_id = m.manufacturers_id GROUP BY p.products_id