title: activemq - the simplest way to count number of messages with a specific property value
body: <p>In out product we need to count occasionally the number of messages in a queue that hold a specific property value.
  The straight forward way is to use a queue browser with a selector. But:</p>
  
  <ol>
  <li>Is there a way to get this statistics without browsing all relevant messages? We don't need the data, only the count.</li>
  <li>If we do go for the queue browser approach, will it also browse messages that were consumed by some consumer, but not acknowledged yet?</li>
  </ol>