This question is in fact asking how a compound word in the Chinese language is formed and used. A compound word includes multiple characters, each with its own basic meaning. Combining the characters in a certain order may reveal the meaning of the compound word.
However, the underlying logic of word analysis can not be applied inversely, because not any arbitrary two or more meaningful characters could be combined to form a meaningful compounded word, even if the apparent logic might suggest a meaningful word. For example, the word 物理 means physics, but 物论 or 物学 means nothing.
词汇 is the translation of "vocabulary", and 词汇量 is the number of words included in the vocabulary of a book or known by a person. 汉字 means a Chinese character or a collection of characters. But people do not use 汉字量 to indicate the quantity of 汉字 (s) included in a book or known by a person. I do not know why, but that is the current situation. It is possible that it become a word in the future.
Whenever you have a doubt, just Google it. When I Google 汉字量, I only get 汉语识字量。
By the way, 字数 (number of characters) is a specific word used in book publication.