def count_args(func_el):
    """
    Have to handle positional-only, keyword-only, and standard arguments. Not
    counting any unpacked args (vararg and kwarg).
    """
    posonlyargs = func_el.xpath('args/arguments/posonlyargs/arg')  ## python 3.8+
    args = func_el.xpath('args/arguments/args/arg')
    kwonlyargs = func_el.xpath('args/arguments/kwonlyargs/arg')
    all_args_n = len(posonlyargs + args + kwonlyargs)
    return all_args_n