Added ability to set a selection limit.
Use:
Add a data-limit with an integer value to the <select> object, like so:
    <select id="mylist" multiple="multiple" data-limit="3">

Optionally, send in a limit_reached function to handle a selection beyond the limit that has been set.

This is in answer to a StackOverflow problem: http://stackoverflow.com/questions/16670950/how-to-limit-the-amount-of-options-selected-to-3-on-multiselect-in-wordpress#comment23987361_16670950

Example jsFiddle on use: http://jsfiddle.net/mori57/L5EMy/