def message_retry_count(message):
    """ returns the retry_count kepts in the headers
    :param message: the message whose retries needs to be counted
    :returns the value of the retry_count from the header
    """
    return message.header_frame.headers.get('max_retry', None)
