Change atribute hits to private

Change atribute hits to private and add method getHits to return value of hits.