The length of a unit object is defined as the number of unit values in the unit object.
unit.length(unit)
unit
An object of class unit.
Paul Murrell