SELECT UserID, COUNT(*) FROM
(SELECT UserID FROM tablename
UNION ALL
SELECT UserID2 FROM tablename) t
GROUP BY UserID
No incluí el id
columna porque no parece correlacionarse con los valores.
Si desea ver todos los ID de cada nombre, puede usar GROUP_CONCAT:
SELECT GROUP_CONCAT(id), UserID, COUNT(*) FROM
(SELECT id, UserID FROM tablename
UNION ALL
SELECT id, UserID2 FROM tablename) t
GROUP BY UserID