A selection procedure for estimating the number of signal components