Damit ich endlich mal wieder was anderes als Java oder Flex (würg) machen kann hier das ganze als C# Beispiel:
static void Main(string[] args)
{
List<string> list = new List<string>() { "1", "2", "3", "1", "2", "1", "2", "2", "3", "1", };
Dictionary<string, int> dict = new Dictionary<string, int>();
for (int i = 0; i < list.Count; ++i)
{
if (dict.ContainsKey(list[i]))
{
dict[list[i]]++;
}
else
dict[list[i]] = 1;
}
foreach (KeyValuePair<string, int> p in dict)
{
Console.WriteLine("{0}: {1}", p.Key, p.Value);
}
Console.ReadKey();
}[/PHP]