There are 20 books in a bookcase. Each shelf has the same number of books. Ivan removes 3 books from one shelf. Then there are 2 books left on that shelf. How many shelves are in the bookcase?

Let s be the number of books on each shelf.

There are 20 - 3 = <<20-3=17>>17 books left on the shelf.
This means there are 17 / 2 = <<17/2=8.5>>8.5 shelves.
Since shelves cannot be in halves, there are 8 shelves. Answer: \boxed{8}.