get_length function

Get C length of a vector