code: public long getMessageCount(String queue){
          try {
              return getQueueControl(queue).getMessageCount();
          } catch (Exception e) {
              throw new AsyncException(e);
          }
      }
docs: Returns number of messages currently in queue
  
  @param queue queue name
  @return number of messages currently in queue