To clarify further the aprt in question could change.
So in one case we could have 4 bodies (sketch & extrude) each with 5 dimensions. Total of 20 dimensions.
and another case we could have Lets say we have 10 bodies (sketch & extrude) each with 7 dimensions. Total of 70 dimensions.
dimensions are unrelated to bodies. They belong to sketches. So, a dimension would be identified as "D1@Sketch2" for example. Sketch 2 may well have been used to create 2 bodies. There wouldn't be an easy way of identifying which body the dimension related to.
But it would be easy to list all the dimensions used in extrudes.