Is this statement in agreement with Darwin's theory of evolution?
Short Answer

The statement "The number of offspring is not related to fitness." is wrong! In other words, The number of offspring is related to fitness.

Various definitions of fitness exist depending on the model you want to use but whatever is the model you want to use the number of offspring is always related to fitness. For the purpose of a beginner in evolutionary biology, it is probably enough to assume that the number of offsprings that managed to survive to some adult age and fitness are actually the exact same thing.

Long Answer

Darwin's theory of evolution?

What do you call Darwin's theory of evolution? Do you mean the theory of evolution as it was formulated by Charles Darwin at its time or do you mean the current theory of evolution? Charles Darwin never used the word fitness (if I am not mistaken), so I will talk about the modern theory of evolution only.

Generalities

For most of the purpose it is enough to consider fitness as being the expected number of offsprings that manage to survive to some adult age of an individual given its environment and its genotype. The word "expected" used above refers to the first statistical moment (mean) of the random variable which is the number of offspring of an individual given its genotype and its environment. In other words, the number of offsprings is "related" to fitness.

Absolute versus Relative fitness

In general, we talk about absolute and relative fitness, where the absolute fitness of an individual is its number of offsprings and the relative fitness of an individual is its absolute fitness divided by either the mean fitness of the population or more often divided by the absolute fitness of the fittest individual in the population.

Fitness is a function of fecundity and survival

To be a bit more accurate, fitness is a function of both age-specific survival and age-specific fecundity. A very good measure of fitness is given be the elements of leading eigenvalue of the Leslie matrix $L$ in $\overrightarrow n_{t+1} = L \overrightarrow n_t $ where $\overrightarrow n_t$ is a vector that gives the number of individuals of a given genotype of each age living at time $t$. $\overrightarrow n_t = (n_{1t}, n_{2t}, …, n_{nt})^T$, where $T$ indicates transpose and $n_{xt}$ is the number of individuals of age classe $x$ at time $t$.

Definitions of fitness slightly varies depending on the model you want to use

One may want to use an even more complex definitions of fitness, typically when using models that apply to species that have an alternation of generation. Or when considering, genotypes that have different norms of reactions and considering a changing environment through time.

Anyway, whatever is the model you want to apply, fitness is always related to the expected number of offsprings. It would be wrong though to reduce fitness to the expected number of offsprings only, because a more complex definition might be necessary in some special cases. In any case, fitness is always an index of how much will a variant spread in a population and is therefore closely linked to the number of offsprings.