How to count selected options from a drop-down field?