Andrew,
Here's a quick little lisp that uses a list defined inside the lisp for the blocks to count. It will not count nested blocks. It inserts an Mtext object at 0,0 in Modelspace and assumes that it is the only Mtext object at that location. If there is a chance of a conflict, any arbitrary coordinate you would like can be used. If there is already an Mtext at that location (ie - from this being previously run in the drawing) it will be updated with the new data.
It is NOT set up to be run automatically, but someone with reactor knowledge better than I should be able to make it work as such. But just calling the command from a button whenever you need the updated data won't be that bad.
(defun c:blk-count-update (/ blist str *doc* ss txt inspt)
;;; Place the desired block names into the following list,
;;; you can use as many as you want, remove the "test" blocks I used
(setq blist (list "test1" "test2")
inspt '(0.0 0.0 0.0) ; modify for different insertion point
str "Block - Count"
*doc* (vla-get-activedocument (vlax-get-acad-object))
)
(foreach x blist
(if (setq ss (ssget "x" (list '(0 . "INSERT") (cons 2 x))))
(setq str (strcat str "\\P" x " - " (itoa (sslength ss))))
)
)
(if (> (strlen str) 13)
(progn
(setq ss (ssget "c" inspt inspt '((0 . "MTEXT"))))
(if (not ss)
(progn
(setq txt (vlax-invoke (vla-get-modelspace *doc*) "addMtext" inspt 0 str))
(vla-put-color txt 8); I did this just to make it different
)
(progn
(setq txt (vlax-ename->vla-object (ssname ss 0)))
(vla-put-textstring txt str)
)
)
)
)
(princ)
)