En mia vilağo estas nur sesdek loğantoj
Is habitant a wrong word for this sentence?
"Inhabitant" may be the word that you're thinking of.
Does this sentence say that the village has 2000 inhabitants total, or does it say that there are only 2000 out of an unknown total population currently present? Or does it depend on context?
I personally would infer that there are only two thousand inhabitants total, but that may just be me.
Both meanings are possible, but the presence of vilaĝo points to the former. If you replaced it with urbego, the latter would probably be a more natural interpretation.
I think you qualify as a "small town" once you reach 1000.