Proof of Hofer-Wysocki-Zehnder's two or infinity conjecture