Available books count functionality moved from view to DAO