select count(*) from theTable where column1 in (select column1 from theTable where column2 = 123) and column2 = 124