@synchronized(lock)<EOL><INDENT>def subscriber_count(self, destination=None):<DEDENT>
if destination:<EOL><INDENT>return len(self._queues[destination])<EOL><DEDENT>else:<EOL><INDENT>total = <NUM_LIT:0><EOL>for k in self._queues.keys():<EOL><INDENT>total += len(self._queues[k])<EOL><DEDENT>return total<EOL><DEDENT>
Returns a count of the number of subscribers.

If destination is specified then it only returns count of subscribers 
for that specific destination.

@param destination: The optional topic/queue destination (e.g. '/queue/foo')
@type destination: C{str}