Count Distinct Elements In An Array In C