def count_bulls_cows(user_string, comp_string):
    """
    Function compare two strings and count bulls and cows
    :param user_string: string which has the same length as comp_string
    :param comp_string: string which has the same length as user_string
    :return: tuple with number of cows and bulls
    """

    bulls = 0
    cows = 0

    for index, num in enumerate(user_string):
        if comp_string[index] == user_string[index]:
            bulls += 1
        if num in comp_string and comp_string[index] != user_string[index]:
            cows += 1

    return bulls, cows