count( obj ) {
    if (!obj) { return 0; }
    if (obj.history) { return obj.history.length; }
    if (obj.sets) { return obj.sets.length; }
    return obj.length || 0;
  }
Get a safe count of the number of things in a section.