Among the objects that have multiple relations, how many images whose captions for the prediction class ids are "on"?
objects that have multiple relations refers to OBJ1_SAMPLE_ID ! = OBJ2_SAMPLE_ID; captions for the prediction class ids are "on" refers to PRED_CLASS = 'on'
SELECT COUNT(T2.PRED_CLASS_ID) FROM IMG_REL AS T1 INNER JOIN PRED_CLASSES AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T1.OBJ1_SAMPLE_ID != T1.OBJ2_SAMPLE_ID AND T2.PRED_CLASS = 'on'