SELECT COUNT(DISTINCT items.id) AS total FROM gwronew.items LEFT OUTER JOIN gwronew.cp_itemshop ON cp_itemshop.nameid = items.id WHERE 1=1 AND ((equip_locations = 0 OR equip_locations IS NULL) OR equip_locations = ? OR equip_locations = ? OR equip_locations = ? OR equip_locations = ? OR equip_locations = ? OR equip_locations = ? OR equip_locations = ? OR equip_locations = ? OR equip_locations = ? OR equip_locations = ? OR equip_locations = ? OR equip_locations = ? OR equip_locations = ? OR equip_locations = ? OR equip_locations = ? OR equip_locations = ? OR equip_locations = ? OR equip_locations = ? OR equip_locations = ? OR equip_locations = ? OR equip_locations = ? OR equip_locations = ? OR equip_locations = ? OR equip_locations = ? OR equip_locations = ? OR equip_locations = ? OR equip_locations = ?)