How do I determine the difference between two indices?

The Cardinality Aggregation is an approximate count, so if it does not match the exact "_count" value, thats expected.

About finding differences of two indices, can you re-formulate the question? I assume at first you are interested in documents that appear in one index but not in the other, and not about detecting differences in document with the same "_id", since the latter probably requires iterating over all documents. Do the documents have a unique field? Is the "_id" supposed to be the same in both indices?