Count number of bends in sheetmetal part

How can I COUNT NUMBER OF BENDS of sheetmetal part and able to enter in custom properties?

SolidworksSheet Metal