Kaltlin bought some books for $6 each and received a discount of $8 off of her total purchase. She spent $58 after the discount. How many books did she buy? Write an equation that can be used to answer the question above.