We need a function ```count_sel()``` that receives an array or list of integers (positive and negative) and may give us the following information in the order and  structure presented bellow:

```[(1), (2), (3), [[(4)], 5]]```

(1) - Total amount of received integers.

(2) - Total amount of different values the array has.

(3) - Total amount of values that occur only once.

(4) and (5) both in a list

(4) - It is (or they are) the element(s) that has (or have) the maximum occurrence. If there are more than one, the elements should be sorted (by their value obviously)

(5) - Maximum occurrence of the integer(s)

Let's see some cases
```python
____ count_sel([-3, -2, -1, 3, 4, -5, -5, 5, -1, -5]) ----> [10, 7, 5, [[-5], 3]]

(1) - The list has ten elements (10 numbers)

(2) - We have seven different values: -5, -3, -2, -1, 3, 4, 5 (7 values)

(3) - The numbers that occur only once: -3, -2, 3, 4, 5 (5 values)

(4) and (5) - The number -5 occurs three times (3 occurrences)

____ count_sel([4, 4, 2, -3, 1, 4, 3, 2, 0, -5, 2, -2, -2, -5]) ----> [14, 8, 4, [[2, 4], 3]]
```
Enjoy it and happy coding!!

Difficulty: EASY
Tags: Fundamentals

Sorting

Data structures
Skill types: Sorting

Data structures

Starter code:
def count_sel(lst):
	

Solutions:
from collections import defaultdict, Counter

def count_sel(nums):
	cnt = Counter(nums)
	d = defaultdict(list)
	total = 0
	unique = 0
	for (k, v) in cnt.items():
		d[v].append(k)
		total += v
		unique += 1
	maximum = max(d)
	return [total, unique, len(d[1]), [sorted(d[maximum]), maximum]]


def count_sel(lst):
	occ = lst.count(sorted(lst, key=lambda x: lst.count(x), reverse=True)[0])
	return [len(lst), len(set(lst)), len([x for x in lst if lst.count(x) == 1]), [sorted(set((x for x in lst if lst.count(x) == occ))), occ]]


from collections import Counter

def count_sel(lst):
	c = Counter(lst)
	m = max(c.values())
	return [len(lst), len(c), sum((x == 1 for x in c.values())), [sorted((k for (k, v) in c.items() if v == m)), m]]


def count_sel(lst):
	dic = {}
	result = []
	arr_temp = []
	for elm in lst:
		if elm not in dic:
			dic[elm] = 1
		else:
			dic[elm] += 1
	result.append(len(lst))
	result.append(len(dic.keys()))
	result.append(list(dic.values()).count(1))
	for (elm, occurrence) in dic.items():
		if occurrence == max(dic.values()):
			arr_temp.append(elm)
	result.append([sorted(arr_temp), max(dic.values())])
	return result


def count_sel(lst):
	r = [len(lst), len(set(lst)), sum((lst.count(i) == 1 for i in set(lst)))]
	rm = max((lst.count(i) for i in set(lst)))
	rv = sorted((i for i in set(lst) if lst.count(i) == rm))
	r.append([rv, rm])
	return r


from collections import Counter

def count_sel(lst):
	freq = Counter(lst)
	return [len(lst), len(set(lst)), len([x for x in lst if lst.count(x) == 1]), [sorted((k for (k, v) in list(freq.items()) if v == freq[max(freq, key=freq.get)])), freq[max(freq, key=freq.get)]]]


from collections import Counter, defaultdict

def count_sel(lst):
	c = Counter(lst)
	freq = defaultdict(list)
	for (n, v) in c.items():
		freq[v].append(n)
	(maxF, fLst) = max(freq.items(), default=(0, []))
	return [len(lst), len(c), len(freq[1]), [sorted(fLst), maxF]]


import collections

def count_sel(lst):
	counter = collections.Counter(lst)
	mode_count = counter.most_common(1)[0][1] if lst else 0
	return [len(lst), len(counter), sum((v == 1 for v in counter.values())), [sorted((k for (k, v) in counter.items() if v == mode_count)), mode_count]]


from collections import Counter

def count_sel(lst):
	one = sum((float(i).is_integer() for i in lst))
	two = len(set(lst))
	three = sum((lst.count(i) == 1 for i in lst))
	four = [i for i in Counter(lst).most_common()]
	k = max((i[1] for i in four))
	four = sorted((i[0] for i in four if i[1] == k))
	five = lst.count(four[0])
	return [one, two, three, [four, five]]


from collections import Counter

def count_sel(lst):
	c = Counter(lst)
	length = len(lst)
	unique = len(c)
	once = sum((1 for (elem, cnt) in c.items() if cnt == 1))
	max_occur = max(c.values())
	most = sorted((elem for (elem, cnt) in c.items() if cnt == max_occur))
	return [length, unique, once, [most, max_occur]]