BIP341 uses a function named compact_size in two instances: when constructing the tapleaf hash, it takes as input the size of the spending script, and when constructing the signature message, if the annex is present, it takes as input the size of the annex.
However, unlike other functions in the document which are mostly defined in BIP340, I can't find the definition for this one in either of them, so what is it?