Part of a program i'm trying to write involves me counting the number of each element in a list. For example,
number([a,a,b,c],list) should return the number of each element.
e.g. list = [[a,2],[b,1],[c,1]]
If anyone could help it would be much appreciated.