Mary,
If you have a selection control named gaga, you can get:
- The number of selected items with: count(xxf:split($gaga))
- The total number of selectable items with: count(xxf:itemset('gaga-control', 'xml')/itemset/choices/item)
Because of the way things are evaluated, the value of the second expression will be 0 right after the form is loaded, but will become "correct" as soon as a value is changed, which should be fine for the purpose of validation.
I hope this helps,
Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet