Count topics in map.mmbas

Sub Main MsgBox ActiveDocument.Range(mmRangeAllTopics).Count & " topics in document" End Sub