Automatic generation of secure passwords with the least inconvenience for a user
The entropy of a random password is given by the formula:

$H = log_2 N^L = L\log_2 N$

where $N$ is the number of possible symbols, and $L$ is the length of the password. Since you want to know the minimum length to achieve a determined level of security, then the answer to your question is $L = \lceil \frac{H}{log_2 N} \rceil$.

In your case, $N=20$, and your desired entropy $H$ depends on the requirements of your system. RFC 4086 gives some guidelines about it. Let us assume you want to have only a one in a million chance of a password being guessed, then you need at least 39 bits of randomnes, so $H = 39$. Then $L = \lceil \frac{H}{log_2 N} \rceil = \lceil 9.02 \rceil = 10 $, so you need at least 10 characters. 
Of course, if you want to achieve more bits of randomness, then the length will increase. For instance, for 128 bits, you need at least 30 characters.

Note: All this info comes from Wikipedia