i could write a sql query but is there a way to do this search from the UI?
Since sql is probably your best bet, the sql is pretty straight forward.
SELECT c.display_name, g.name, count(*) FROM civicrm_group_contact gc, civicrm_contact c, civicrm_group g where gc.contact_id = c.id and gc.group_id = g.id and gc.status = 'Added' group by 1 having count(*) = 1
If you're trying to count the number of groups each contact is in (and select only those with a single group) then to SQL you shall go!
I think you'll have to model this as a custom search (i.e. embed your sql query in a custom search). Not sure if your description includes smart groups, in which case the problem is a bit more complicated.