You are given array of integers, your task will be to count all pairs in that array and return their count.

**Notes:**
   
* Array can be empty or contain only one value; in this case return `0` 
* If there are more pairs of a certain number, count each pair only once. E.g.: for `[0, 0, 0, 0]` the return value is `2` (= 2 pairs of `0`s)
* Random tests: maximum array length is 1000, range of values in array is between 0 and 1000


## Examples

```
[1, 2, 5, 6, 5, 2]  -->  2
```
...because there are 2 pairs: `2` and `5`


```
[1, 2, 2, 20, 6, 20, 2, 6, 2]  -->  4
```

...because there are 4 pairs: `2`, `20`, `6` and `2` (again)

Difficulty: EASY
Starter code: def duplicates(arr):
	

Solutions:
def duplicates(arr):
	return sum((arr.count(i) // 2 for i in set(arr)))


from collections import Counter

def duplicates(arr):
	return sum((v // 2 for v in list(Counter(arr).values())))


def duplicates(arr):
	return sum((arr.count(n) // 2 for n in set(arr)))


from collections import Counter

def duplicates(arr):
	return sum((v >> 1 for v in Counter(arr).values()))


from collections import Counter

def duplicates(a):
	return sum((e // 2 for e in Counter(a).values()))


import collections

def duplicates(arr: list):
	sumDup = 0
	arr = collections.Counter(arr)
	for i in arr:
		sumDup += arr[i] // 2
	return sumDup


def duplicates(lst):
	return sum((lst.count(n) // 2 for n in set(lst)))


def duplicates(arr):
	return sum([arr.count(item) // 2 for item in set(arr)])


def duplicates(arr):
	i = 0
	for iter in arr:
		i += int(arr.count(iter) / 2) / arr.count(iter)
	return round(i)


def duplicates(arr):
	(seen, count) = (set(), 0)
	for n in arr:
		if n in seen:
			seen.remove(n)
			count += 1
		else:
			seen.add(n)
	return count