def unit_length(u):
    """
    Returns the number of terminals (excluding remote units and punctuations) that are descendants of the unit u.
    """
    return len(u.get_terminals(punct=False, remotes=False))
