How to auto count inspection borders in a SolidWorks drawing using macro?

Hello everyone,

 

I am trying to count the number of inspection borders automatically, but it has become too hectic with many numbers of inspection borders for various things and link it to a property so that I can them populate on the drawing.