It should return number of rows. http://developer.couchbase.com/mobile/develop/references/couchbase-lite/couchbase-lite/query/query-enumerator/index.html#int-count--get-
Give us few days to reproduce and investigate this issue.
I filed the issue on github repo’s issue tracker.
@hideki Thanks for the reply its working according to https://github.com/couchbase/couchbase-lite-java-core/issues/637 answer given by sergio91pt .I request couchbase people to improve documentation with more examples specially with composite key which i dint find here http://developer.couchbase.com/mobile/develop/guides/couchbase-lite/native-api/query/index.html there is no example for query.setKeys() method thanks.
I am glad to hear you could solve the problem.
Following is link to unit test case for query with compound keys. It might help you.
Have a nice weekend!