How to perform facets on combination of fields?

We want to perform facets on combination of fields.

For example:
Lets consider, my index contains two columns: Auther and Books. And we want to perform facets on combination of fields. Below is the expected output.
Auther Books Count
abc pqw 10
abc asd 20
asd pqw 12

so, it's like abc and pqw combinations are 10 among all rows.

Did you try using script?