import re


def get_number(data_string):
    """Extract number from data_string and return as integer."""
    if len(data_string) == 0:
        return 0
    elif "(" in data_string:
        n, *_ = data_string.split("(")
        number = re.sub(r"\D", "", n)
        return int(number) if len(number) > 0 else 0
    else:
        number = re.sub(r"\D", "", data_string)
        return int(number) if len(number) > 0 else 0