JMS Messaging and in general most messaging involves decoupled resources where senders don't have knowledge of the receivers and vice versa. Counting the receivers in your code for whatever usually means you are doing something wrong. If you must though there are some ways, although more limited ways in .NET vs Java as you can't use JMX. The broker allows for a StatisticsBrokerPlugin which allows you to send a control message to the broker on a specific queue and get a reply with stats on various things going on in the broker. The documentation is here.
You code would look something like the following Java sample.
Queue replyTo = session.createTemporaryQueue();
MessageConsumer consumer = session.createConsumer(replyTo);
Queue testQueue = session.createQueue("TEST.FOO");
MessageProducer producer = session.createProducer(null);
String queueName = "ActiveMQ.Statistics.Destination." + testQueue.getQueueName()
Queue query = session.createQueue(queueName);
Message msg = session.createMessage();
producer.send(testQueue, msg)
msg.setJMSReplyTo(replyTo);
producer.send(query, msg);
MapMessage reply = (MapMessage) consumer.receive();
assertNotNull(reply);
assertTrue(reply.getMapNames().hasMoreElements());
for (Enumeration e = reply.getMapNames();e.hasMoreElements();) {
String name = e.nextElement().toString();
System.err.println(name + "=" + reply.getObject(name));
}