Count facet range in nested?

My data
var user1 = {"friends": array(idFriend1, idFriend2, idFriend3,
idFriend4,...,idFriendN)}
var user2 = {"friends": array(idFriend1, idFriend2, idFriend3,
idFriend4,...,idFriendN)}
var userN= {"friends": array(.....)}
I want to list and count all persons who have 0-10 friends, 11-100 friends,
etc...
I had tried many ways to manage but it isn't successfully. Who knows how to
solve this problem, please guide me. Thanks a lot!

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.