Counter Attribute: is numbering global to the folder?

When using the counter attribute, is the number sequencing global to the folder, or filename-specific?
What I am trying to do is this:
1. add a file to the folder, named as "image_A.jpg"
2. have Hazel that file rename to "image_A-v01.jpg"
3. add a new file to the folder, again named "image_A.jpg"
4. have Hazel that file rename to "image_A-v02.jpg"
That part works fine.
Now let's say I add, in the same folder, a file named "image_B.jpg"
Will Hazel number is as "image_B-v01.jpg" (new numbering sequence), or "image_B-v03.jpg" (global folder sequence).
In other words, does Hazel do the sequence based on filename matching, or just look for the highest existing sequence number that matches the sequence pattern, and increment by one?
The reason I ask is that I am seeing results that match neither scenario, which is confusing. An added file got sequenced as "image_B-v04.jpg", even though there was no "image_B-v01.jpg" in the folder.
There was a file named "image_A-v02.jpg", which if the numbering sequence was global to the folder, I would have expected the renamed file to be "image_B-v03.jpg"
So it was not the result I was expecting either way.
The preferable result would be for the sequencing to apply to matching filenames. Separate sequencing only if the filenames are the same.
What I am trying to do is this:
1. add a file to the folder, named as "image_A.jpg"
2. have Hazel that file rename to "image_A-v01.jpg"
3. add a new file to the folder, again named "image_A.jpg"
4. have Hazel that file rename to "image_A-v02.jpg"
That part works fine.
Now let's say I add, in the same folder, a file named "image_B.jpg"
Will Hazel number is as "image_B-v01.jpg" (new numbering sequence), or "image_B-v03.jpg" (global folder sequence).
In other words, does Hazel do the sequence based on filename matching, or just look for the highest existing sequence number that matches the sequence pattern, and increment by one?
The reason I ask is that I am seeing results that match neither scenario, which is confusing. An added file got sequenced as "image_B-v04.jpg", even though there was no "image_B-v01.jpg" in the folder.
There was a file named "image_A-v02.jpg", which if the numbering sequence was global to the folder, I would have expected the renamed file to be "image_B-v03.jpg"
So it was not the result I was expecting either way.
The preferable result would be for the sequencing to apply to matching filenames. Separate sequencing only if the filenames are the same.