Returns the number of dimensions in the specified cube.
CUBEDIMENSIONCOUNT(cube)
cube
CUBEDIMENSIONCOUNT("Sales")
Note: Returns 4 if the if there was only 4 dimensions in the Sales cube.