Enumerator#size support for ranges

Range size support #980.

Also provides the promised test coverage for #1305.