A random-matrix theory of the number sense