Estimating the number of signals in the presence of nonuniform noise