Calculating number of selections