SELECT COUNT(*) FROM theTable A INNER JOIN theTable B ON A.column_2 = B.column_2 WHERE A.column_1 = ? AND B.column_1 = ?