def number_from_class(number_class):
    """Helper method to return the last char as integer from a numbered
    class. example: stars1 stars2 stars3

    Args:
        number_class (str): class name that has a number at the end

    Returns:
        int: the number representation of the class.
    """
    try:
        n = int(number_class[-1])
    except ValueError:
        n = 0
    return n