This is a variant of Derek Holt's answer. Note that if $X$ is a finite group, and $S = \{x_{1},x_{2},\ldots,x_{r} \}$ is an irredundant generating set for $X$ ( that is, if any $x_{i}$ is omitted, the remaining elements do not generate $X$), then $\langle x_{1} \rangle < \langle x_{1},x_{2} \rangle < \ldots \langle x_{1},\ldots x_{r-1} \rangle < X$ is a strictly increasing sequence of subgroups of $X.$ It follows that $r \leq \log_{2}(|X|),$ in fact $r \leq \log_{p}(|X|),$ where $p$ is the smallest prime divisor of $|X|.$
Hence if $G$ is an infinite group, all of whose proper subgroups are finite, of order at most $n,$ then any irredundant generating set for $G$ has at most $1 + \log_{2}(n)$ elements.For if the chosen generating set has $s$ elements, then any $s-1$ elements irredundantly generate a proper subgroup, say $H$, of $G$, and $H$ has order at most $n.$ This bound can obviously be improved with finer knowledge of the possible prime divisors of orders of proper subgroups of $G.$