>>> from expressions import items_count_1 >>> items_count_1('((x[i]+2)*(3*r[4]/z)))') (4, 3) >>> items_count_1('(f(x)))//(5*x[2]-y)') (4, 2) >>> items_count_1('{4:{5:[3, 4], 6:[7, 8]}, 9:[1, 2, 3, 4, 5]}') (0, 13) >>> items_count_1("d[4] = {'a':'((x+2)*(3*r/z))}'") (5, 3)