def count_divisible_digits(n, m):
    """
    This function takes two integer numbers n and m as an arguments
    and returns the number of digits in n that are divisible by m.
    """
    if n < 0:
        n = n * -1
    if m == 0:
        return 0
    count = 0
    while n != 0:
        digit = n % 10
        remainder = digit % m
        if remainder == 0:
            count += 1
        n = n // 10
    return count