Сount chosen objects

How to count quantity of the objects chosen by means of the mouse? For example circles

SolidworksApi macros