If you have upper and lower bounds M and 0, then you can apply [Popovivicu's upper bound on variance][1]:
$$\sigma^2<\frac 1 4M^2$$

Once you have the variance, apply usual sample mean distribution logic, i.e. the variance of a sample mean $\bar x$ to be $\sigma^2_{\bar x}\sim\sigma^2/n$. The rest is trivial.

$$\frac {10}{(\sigma^2_{\bar x}/n)}=2.58$$
$$n=0.258\sigma^2_{\bar x}=0.067M^2$$

# "Derivation"
Ok, how would I proceed to derive this? I'd imagine the distribution with highest variance (entropy) possible, that is bounded between M and 0. That must be Bernoulli:
$$x=0:p=1/2$$
$$x=M:p=1/2$$
Then the mean is $$\mu=M/2$$ and the variance is
$$\sigma^2=M^2/2-(M/2)^2=M^2/4$$



  [1]: https://en.wikipedia.org/wiki/Popoviciu%27s_inequality_on_variances