I created a class derived from std::list. I'm adding an insertion method where if an item is already present, the list items will become ordered by the frequency with which they have occured, most frequent items first. If I wasn't using STL, I'd just add an int item to the node struct to hold the number of times the item had been accessed. I'd like a suggestion about how I can keep track of the frequency of the items. Also how I can access the frequency data so I can sort the items later on.