Issue 19: fix item count display when switching between list and detail
modes.