'Return the total number of hits for query
:type query: :class:`boto.cloudsearch2.search.Query`
:param query: a group of search criteria
:rtype: int
:return: Total number of hits for query'

def get_num_hits(self, query):

    query.update_size(1)
    return self(query).hits
