find how many times a given number is repeating