Bounds for maximum number of code-words in a ternary error correcting code with length n and distance d?
The exact answer is unknown in general. One standard upper bound for $q-$ary codes is the Singleton bound, which gives
$$|C|\leq q^{n-d+1},$$ and codes meeting this bound are called MDS.

A lower bound is the Gilbert-Varshamov bound, given by

$$|C|\geq \frac{q^n}{\mathrm{Vol}_q(d-1)}=\frac{q^n}{\sum_{k=0}^{d-1} \binom{n}{k}(q-1)^k}.$$
Using these keywords should get you started, there are many more results.