You're just adding a select query to a WHERE statement. That won't do anything. You need to actually condition it. Example as follows.
Code:
( SELECT COUNT( * ) FROM `#__comprofiler_members` AS m WHERE m.`referenceid` = u.`id` AND m.`accepted` = 1 ) > 0
Your query doesn't make any sense either as it has no relation to the tables being queried like my above example so it won't filter anything out. You'd need something like the below for example to filter the userlist to users that 554 is connected to.
Code:
( SELECT COUNT( * ) FROM `#__comprofiler_members` AS m WHERE m.`referenceid` = 554 AND m.`memberid` = u.`id` AND m.`accepted` = 1 ) > 0