Even if this thread is some years old, at least it's a standard question, so here comes the standard answer (but it is also given in the referenced thread on fixunix.com):
int msgCount = java.util.Collections.list(queueBrowser.getEnumeration()).size();
where queueBrowser is a standard QueueBrowser object.
So, no specific methods needed, the standard provides it all...
Best regards
Detlev