Counting number of times integer appears in dataset