Book
id| title|
Autor
id|book_id|name_auth
$count=Book::find()
->leftJoin('Author', '`author`.`book_id` = `book`.`id`')
->count();
Книга, 1 а атворов может на 1 книгу несколько.
$books = Book::find()
->with('author')
->all();
foreach($books as $book){
echo "количество авторов у книги " . $book->title . ": " . count($book->author);
}