It was used in precisely the same word contexts as the words for "one", "two", "three" etc. and in those contexts you could substitute any cardinal numeral. Like any cardinal numeral, it could be used to answer questions about how many things are in a certain place.
So it was really the number "zero".
For the empty set, the most appropriate Latin word was the noun "nihil" ("nothing"), sometimes contracted to "nil" (with long "i") hence the NIL of LISP for the empty list.
So the concepts of "zero" and "empty set" were distinguished in Latin and also in the other known ancient languages.
Some modern programming languages use "null" in a wrong way, when they should have stuck to the NIL of LISP. A null integer or floating-point number denotes the quantity "zero", but a null pointer is not a quantity. A null pointer points to nothing, so it denotes the object NIL.
As in, the only thing Lebesgue that my comment mentions.
The cardinal numbers are equivalence classes of the sets. For any other cardinal number except "zero", the equivalence class of that number contains a huge number of sets, potentially infinite.
For "zero", the equivalence class contains only a unique set, the empty set. Because of this one-to-one correspondence between the empty set and "zero", they may be interchanged in many contexts without causing any ambiguities.