The Category object represents a category, assigned to documents in the search results. Use Categories property of Tab object to get reference to the categories collection.
Set FSO = CreateObject("Scripting.FileSystemObject") Set Output = FSO.CreateTextFile("c:\output.txt", True) For Each Category in App.ActiveTab.Categories Output.WriteLine Category.Name & " - " & Category.Count Next