length_IM function

Length of vector or string