Based on the wording of the exercise, I went with the assumption that the number inputted will not appear in the array. Otherwise I would have checked to see how many occurrences of the inputted integer were in the array, and altered the total accordingly.
I feel like there is a better way to do this, but this was the quickest that came to mind. It ain't pretty, but it works.