Analyze the input provided and generate a function in Python that returns "Invalid input" if the input is not a valid integer number, or returns the number of digits in the input number otherwise.
212
def count_digits(inp):
    if not isinstance(inp, int):
        return "Invalid input"
    else:
        return len(str(inp))