SELECT COUNT(DISTINCT(id)) AS nb_total_images
  FROM phpwebgallery_images
    INNER JOIN phpwebgallery_image_category AS ic ON id = ic.image_id
  WHERE ((keywords LIKE '%Õ%')) AND  category_id NOT IN (28,-1)
;
[mysql error 1267] Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation 'like'