1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') and p.properties_zone_id=z.zone_id and p.properties_geozone_' at line 8

select count(distinct p.properties_id) as total from zones z, geo_zones gz, countries co, ((properties p, categories c, properties_to_categories p2c) left join properties_description pd on p.properties_id = pd.properties_id and pd.language_id = '1') where c.categories_status=1 and p.properties_id IN () and p.properties_zone_id=z.zone_id and p.properties_geozone_id=gz.geo_zone_id and p.properties_country_id=co.countries_id and p.properties_id = p2c.properties_id and c.categories_id = p2c.categories_id and p.properties_status = '1'

[XT SQL Error]