Summing the count of two columns in postgres that contain the same value
You can get it converting the two columns into a single column.

SELECT node, COUNT(*) as node_count
FROM
(
    SELECT id, node1 as node
    FROM   t1
    UNION
    SELECT id, node2 as node
    FROM   t1
) t2
GROUP BY node
HAVING COUNT(*) &gt; 1
ORDER BY node;




node | node_count
---: | ---------:
 111 |          5
 122 |          2
 124 |          2



db&lt;>fiddle here