convert arrays to a number length

cc @calvinfo — server needed next