Try following example from SolidWorks API help "Select Edges of All Holes on Face Example (VBA)". You will probably get the information you need.
Thank you Nilesh Patel, this helped me alot...
I added a code to select and work on folded component, so now I'm able to count the number of holes on every SheetMetal part. indipendent on what feature was used to create them.
Have a good day and thanks again.