Counts the number of dimensions from a nested list of dimension assignments
    that may include function calls.

def count_dimensions(entry):
    """Counts the number of dimensions from a nested list of dimension assignments
    that may include function calls.
    """
    result = 0
    for e in entry:
        if isinstance(e, str):
            sliced = e.strip(",").split(",")
            result += 0 if len(sliced) == 1 and sliced[0] == "" else len(sliced)
    return result