On the Tools menu, point to Validate, and then click Show Article Content Errors, or Show Current Text Errors.
If there are errors, a message is displayed:
To include counter in your scripts:
•For the total number of errors: Dim iErr As Integer = Ted.GetActiveArticle.GetTxtNode(0).JustErrorN
•For the number of errors in the current text: Dim iErr As Integer = Ted.GetTextJustificationErrors