Edit: Originally meant as an answer, but Steven was faster.
There are multiple ways. The best approach is going to depend on personal preference and how many items are in the queue, how many different values are there of the label and how often you want to retrieve that value.
1) Query
You can use the Table.query and have it interpret the queue's subnodes and their labels as a table. All the necessary information can be found in the respective manual page (Querying the contens of a queue is described in "Advaned Query Techniques" about halfway down the page).
A query to retrieve the number of items with "Type" 1 from Queue1 would, for example, look like this:
int itemNum = Table.query("SELECT COUNT($2) AS ItemCount FROM $1 WHERE $3 == $4", Model.find("Queue1"), $iter(1), $iter(1).Type, 1)[1][1];
2) For-Loop
You can also write a simple for-loop that counts the occurence of the given value. (Again, the example counts the occurence of "Type" 1)
Object queue = Model.find("Queue1");
int itemNum = 0;
for(int i = 1; i <= queue.subnodes.length; i++) {
if(queue.subnodes.Type == 1) {
itemNum++;
}
}
3) Map
If there are a lot of items in the queue and you need to read the quantity often, it might be worthwhile to keep a Map of the contents. That way the total of each type is always directly available without needing to count every time.
You can keep the map as a label of the queue, as demonstrated in the attached model. First create any label, then assign a map value to it.
Map map;
Model.find("Queue1").labels["ContentMap"].value = map;
Then set this as the reset value, so the map gets cleared on every model reset.

In the "OnEntry" and "OnExit" triggers, the map is updated to always hold the current number of items of each different label value.

CountLabelValueOccurence_fm.fsm