Sajal is a millionaire and is fond of buying new shoes. But like all rich guys he is careless and do not take care of his things. He messed up all his shoes and some of them are lost. Now he wonders how many of the total shoes that he has are in pairs. Two shoes of same type can form a pair.
Note:- Type 1 and Type 1 can form a pair, but Type 2 and Type 1 cannot form a pair.
Input:-
First line contains T i.e. number of test cases.
First line of each test case contain N , i.e., total number of shoes Sajal has in his wardrobe.
Second line of each test case contain N space separated intergers A1, A2, ... An denoting the type of shoe.
Output:-
Print a single integer per test case denoting the number of pairs that can be formed.
Note:- A shoe can be considered only once while making pairs.
Constraints:-
1 ≤ T ≤ 103
1 ≤ N ≤ 103
1 ≤ Ai ≤ 103
Case1:-
Possible Pairs are:- (A1, A2) and (A3, A4).
Case2:-
Possible Pair is (A2,A3).
Case3:-
No possible pair.