def get_spaces_count_at_beginning(text):
    """
    Returns the total number of spaces at the beginning of the given text
    :param text: str
    :return: int
    """

    return len(text) - len(text.lstrip())