How can i use facet to get the terms count by java api?

I can't find any api to get the count from response.
But response object's toString function shows that facet info is included in it.

surely need i to analyse the json string myself ??!?