The countitems() function returns the number of items in a menu or list field. List fields include list boxes, multi-select list boxes, combo boxes, drop-down lists, button drop lists and visual switches.
• name – The name of the menu or list field for which you want to return the number of items in. The field must be a window field.
Grouped menu items that the application inherited, such as the Clipboard menu items Cut, Copy and Paste, are not counted when the number of items in a menu is returned.