I noticed that very often the word 万 (wàn) occurs in poetry (e.g. poetry of the Tang dynasty). My dictionary reports its meaning as "ten thousands", but it looks like it's used in place of a generic "great number". A sentence I notice very frequently is "万里" (wàn lǐ): I feel like this is just a way to mean "a very long distance".
So, what is the proper meaning and usage of "万"? Is it correct to use it for "great", "enormous"? On the other side, to mean "huge", "great", is it correct to use "万", 10000, and not something else (maybe even numerically bigger), like, "one million", "one billion"?