Count Each Face, Edge, Vertex... of a Part

Experts,
I am developing an add-in that extracts the geometrical and topological of a part and i want count the number of each face, edge, vertex... of the part.
Is there a macro that fulfill this function or what are the functions to use to extract these data.

I know that this is faisable by Power Select but I want to extract and then export the data to Excel.
Thank you very much

SolidworksApi macros