There are indeed slightly different meanings of the word "Zahl":
(1) In can refer to an amount. In that case, "Zahl" can also usually be replaced by "Anzahl".
Example: "Die Zahl/Anzahl der Wartenden war zehn." (Granted, this sentence sounds very formal; "Anzahl" is not often used in daily life. One would rather say: "Es haben zehn Leute gewartet.")
(2) It can refer to an index. In that case, "Zahl" can usually be replaced by "Nummer".
Example: "Auf oeffentlichen Aemtern bekommt man in Warteraeumen eine Nummer/Zahl. Je hoeher die Nummer/Zahl, umso laenger muss man warten bis man bedient wird."
(3) There are cases where "Zahl" is a technical term and should not be replaced.
Example: "Zehn is eine natuerliche Zahl." ("Nummer" would also be understood, but it is very unusual.)