There are at least two possible scenarios in which one might be uncertain initially how many components might be needed. The first case is incremental evolution: where a sequence of increasingly complex tasks is posed, requiring the evolution in succession of ever more complex hardware systems. The second is evolution for parsimony: where the number of components is to be reduced to a minimum.
If there is no predefined number of components in a structure to be designed by GA, then any encoding of potential solutions onto a genotype will use an amount of information which varies from case to case, given a fixed interpretation process. In other words, genotypes will have to be variable in length. But if the genotype is potentially unbounded in length, then the nature of the search space is such that it is impossible for an initial random population of finite size to effectively sample from all parts of it. Any finite population inevitably spans only a constricted region of the whole. Hence any GA search in an unbounded space must work with a relatively converged finite population from the very start. Possible ways in which systems of variable size can be encoded on a genotype will be discussed below, but this convergence property holds regardless of how the encoding is done.
Something very similar holds true if there is an upper bound to the number of components. Suppose that a maximum of 20 components is allowed for some hardware system, and an initial population contains sampling points to be evaluated with varying numbers of components between 0 and this maximum of 20. Since the subspace of designs with 10 or less components is of a radically different nature from that with 20 components, samples from the former subspace have no useful correlation in fitness with corresponding points from the latter (corresponding in the sense that the extra components have been added without altering the existing ones). But the underlying theory of standard GAs relies on there being some such correlation.
Evolutionary search can, however, operate in domains of varying dimensionality -- indeed evolution in the natural world has done just that. Relatively complex species, with lengthy genotypes, have evolved from simpler ancestors with smaller genotypes, but a present-day animal should not be considered as a solution to a problem posed 4 billion years ago, with a search space of fixed dimensionality.
GAs when applied to search spaces of varying dimensionality need a different framework from those used for standard optimisation problems. Species Adaptation Genetic Algorithms (SAGA) were developed as this framework.