Tom is planning to buy some books. He has $24 saved up. Each book costs $6. How many books can Tom buy with his savings?