• doesn't work, why?

Question related to mission Count Divisibles in Range (simplified)

 
def count_divisible(n: int, k: int) -> int:
    result = 1
    position = 0
    while position <= n:
        position = k*result
        result += 1
    return result

doesn't work, why?