Hou can I find out hou many lines there are on a sheetmetal

If i have a unfoalded sheetmetal i need to find out hou many separated lines there are, Eksampel; the outline of the sheetmetal is one line, and if there are to holes, it vil be tre lines. what comand du i need to use?SolidworksApi macros