@staticmethod
def delivery_count(properties):
    """
        Returns the delivery count for a message from the rabbit queue. The
        value is auto-set by rabbitmq. Will raise KeyError if x-delivery-count
        is missing from message headers.


        :param properties: Message properties

        :returns: Delivery count value
        :rtype: int

        """
    delivery_count = 0
    delivery_count = properties.headers['x-delivery-count']
    return delivery_count + 1
