Tracking occurrences of numbers