throw an exception if CountResponse contains shard failures

(cherry picked from commit bd3ac22acc2c0c13895ce6a70386a0109908add9)
add custom exception for shard failure and use in both ESCount/ESSearch tasks