function guessLength(target) {
  if (typeof target.length === 'number')
    return target.length;

  if (typeof target.size === 'number')
    return target.size;

  return;
}
Function used to guess the length of the structure over which we are going
to iterate.

@param  {any} target - Target object.
@return {number|undefined}