This is a classic riddle!

The answer is **9**.

The phrase "all but 9 die" means that only 9 sheep survived.
