# Filename: selection_num_obj.py
# Purpose: Returns the number of objects in the selection.
# Returns: Integer.

from maptek import vulcan_gui

# select layer non-interactively
sel = vulcan_gui.selection('Select Object')
num = sel.num_obj()

# do something after selection...
print(num)