How to get the number of solid bodies in one part?

Hello.

This macro in API Help shows quantity of bodies in each part of assembly.

I have single part with different number of bodies(1-8)

How we can get number of bodies in this part?

Thank you/

SolidworksApi macros