In ancient received texts such as the Shījīng, the Yìjīng, and others, the primary attested meaning of liǎng 兩 is 'two'. This is specifically in reference to paired sets of things, not just any two things taken together.
In the Hàn the word begins to appear regularly as a general word for "two" or "a couple of".
As a measure word, it is used in ancient texts not only with two-wheeled carriages, but also with wooden clogs (normally two to a set) and lengths of cloth (normally two zhàng 丈 apiece). We read the measure word liàng, but there are ancient scholia that say there is no need to distinguish this word from "two" in pronunciation. A measure word is fundamentally a noun, and there are cases of nouns being read in the qùshēng — very roughly speaking, the Mandarin fourth tone.
The usage as a measure word gave rise to the sense "tael", because a tael is 24 zhū 銖; the huángzhōng 黃鍾 'type of ceremonial bell' weighed 12 zhū 銖, so twice that amount was called a liǎng "two[-fold]". So "tael" is really a derived meaning of the basic word.