To run this script
Select Script → Schematic → Count_Schematic_Elements from the Menus.
Or, in versions that support the script, you can run the utility directly from this page using this button.
This utility will count the enabled elements in the schematic picked by user and it outputs the result in debug window as well as in an Excel sheet. When you run the utility, it prompts a dialog box to select the schematic
After selecting the schematic, it will output the number of elements in debug window and Excel sheet.