Func counting duplicated values @ 1 sorted column