Added a status method CountResponse that resolve shard failures into rest status code. That method is now used in RestCountAction to return proper status.

Closes #3585