table.select: also return length of the returned table