DOM:Selection:rangeCount
From MDC
[edit] Summary
Returns the number of ranges in the selection.
[edit] Syntax
sel.rangeCount
[edit] Notes
Before the user has clicked a freshly loaded page, the rangeCount is 0. A user can normally only select one range at a time, so the rangeCount will usually be 1. Scripting can be use to make the selection contain more than 1 range.