Code:
auto count = unique(books.begin(), books.end(),books.size());
If this is using std::unique()? If yes, then its 3rd param is wrong. Either don't have one or it needs to be binary predicate.
See auto count = unique(books.begin(), books.end(),books.size());

If this is not std::unique(), what's the implementation/declaration?