Select number of components dynamically