Design change: Added getItems() to return the number of valid menu items