Create a method that takes in an array of integers with duplicates and outputs a hash of how often each number occurs.
input: [1,2,2,3,3,4,5,5,5] output: {1:1, 2:2, 3:2, 4:1, 5:5}
This is an excellent way to prepare data for statistics or graphing.