function to get the size of object,len()