Get the last message from Message archive

Hi,

I have just went through the message archive specification for xmpp https://xmpp.org/extensions/xep-0313.html

I want to find the last message send by UserA to UserB. I just tried by setting the count parameter to 1 but it gives me the first message of those two users. Is there a way to get the very last message?

Thanks