Couple things to try:
@auth.requires_login()
def chapter():
chapter_id = int(request.args[0])
chapter = db.chapter(chapter_id) #() instead of []
book = chapter.book
chapter_count = db(db.chapter.book == book.id).count()
return dict(chapter=chapter, book=book, chapter_count=chapter_count)
#dict()

