compute size of a array