Asssuming that $gf == your Glassfish install directory,
$gf/imq/bin has a imqadmin command which connects directly to the JMS server. From there you can view your queues and topics and see how many messages are in them.
[Message sent by forum member 'whartung' (whartung)]
http://forums.java.net/jive/thread.jspa?messageID=323155