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