Returns the number of dimensions present in a cube within the specified model, this function returns an integer value.
cube.dimensionCount(cube_name)
cube_name
let count = cube.dimensionCount("General Ledger");