When setting re-delivery counter from delivery count we must subtract
one to account for the first delivery which is not a re-delivery.
Add re-delivery count test.