Your thread title is misleading, please change it so that it describes your problem more accurately.

Frequency would be how often a number appeared, not when it last appeared.