def _count(values):
    """internal: returns the `number-of-elements` for the argument.
       if argument is a list or type, it returns its `len`, else returns 0 for None
       and 1 for non-None."""
    if type(values) == list or type(values) == tuple:
        return len(values)
    elif values is None:
        return 0
    else:
        return 1