Fixing select count