1 abcd GB 1 abcd UK 1 abcd US 1 addd US But i want the output like, 3 abcd GB, US, UK 1 addd US