The way a dictionary works is that it stores a value for myDictionary[type1], a value for myDictionary[type2], so if type in my example is a variable, the count for each type will be calculated and available in the second portion of the code I have written.