def count_digits(value):
    """
    Count of digits of given number.

    :param value: integer value (can also be negative)
    :returns: count of digits of given number

    >>> count_digits(0)
    1
    >>> count_digits(1024)
    4
    >>> count_digits(1234567890)
    10
    >>> count_digits(-1234567890)
    10
    """
    if value == 0:
        return 1

    value = abs(value)
    result = 0
    while value > 0:
        result += 1
        value //= 10
    return result