internal tool to count XML elements and attributes used in our grammar XML files