group by column and count duplications