--- title: "Count (Dimension) (MDX) | Microsoft Docs" ms.date: 06/04/2018 ms.prod: sql ms.technology: analysis-services ms.custom: mdx ms.topic: reference ms.author: owend ms.reviewer: owend author: minewiskan --- # Count (Dimension) (MDX) Returns the number of hierarchies in a cube. ## Syntax ``` Dimensions.Count ``` ## Remarks Returns the number of hierarchies in a cube, including the `[Measures].[Measures]` hierarchy. ## Example The following example returns the number of hierarchies in the Adventure Works cube. ``` WITH MEMBER measures.X AS dimensions.count SELECT Measures.X ON 0 FROM [Adventure Works] ``` ## See Also [Count (Tuple) (MDX)](../mdx/count-tuple-mdx.md) [Count (Hierarchy Levels) (MDX)](../mdx/count-hierarchy-levels-mdx.md) [Count (Set) (MDX)](../mdx/count-set-mdx.md) [MDX Function Reference (MDX)](../mdx/mdx-function-reference-mdx.md)