You get some statistics from apm::metrics [1] (for example [2]). These metrics counts Tcl line comments as well as ad_proc comments, SQL comments, etc. You will have to do probably some fine-tuning for your needs, but this is at least a start.
-gn
[1] https://openacs.org/api-doc/proc-view?proc=apm::metrics
[2] https://openacs.org/xowiki/categories