Discuss the below:
Q1: Implement the function "count" which takes a list of items and an item as arguments, and returns the number of times the item occurs in the list.
template < typename T >
int count (const list < T > & aList, const T& item);
Q2: Write a C++ program that generates 20 random numbers in the range from 0 to 4. For each number, output its value and insert it into an integer list by using push_back(). In a loop, call the above count function, and display the number of occurrences of each value (0 to 4) in the list.