Enumerators respond to size and return nil

This seems to have changed starting with Ruby 2.0. We now probe further
before we assign the total instead of stopping with size.