Official Solution:
Each shelf of a bookcase contained 12 books. If the librarian took out 21 books and rearranged the remaining books so that all shelves but the last one contained 8 books and that last shelf contained 11 books, how many shelves does the bookcase have?
A. 5
B. 6
C. 7
D. 8
E. 9
Assuming there are \(x\) shelves in total, the initial count of books is \(12x\). After removing 21 books, this count becomes \(12x - 21\).
We are told that, after the rearrangement of that number of books, all shelves, except the last one, have 8 books each, and the last shelf contains 11 books. This implies that there are \((x - 1)\) shelves, each holding 8 books, while the final shelf accommodating 11 books. Therefore, the total number of books is \(8(x - 1) + 11\).
Equating these two expressions, we arrive at the equation \(12x - 21 = 8(x - 1) + 11\). Solving for \(x\) yields \(x = 6\).
Hence, there are a total of 6 shelves in the bookcase.
Answer: B