Added book count to view function