Hi Katy:
You're seeing the correct behavior, the documentation was wrong and I've corrected it. My apologies for this confusion. The yearlySampleCount (and other similar date-based counters) applies to all samples (and data classes/registry sources) across the site. This is true whether you use it standalone or as a modifier on a particular date field you might add.
If you want a local counter that will start at 1, you can use ${genId} - that will apply to a given Sample Type and container, typically used as part of a compound naming pattern.
Another good naming option is to use the ":withCounter" syntax to add an incrementing 'starts from 1' counter to your sample names. For example, if you had a "Blood" sample type and used the naming pattern ${Blood-:withCounter} you'd get names like: Blood-1, Blood-2, etc.
You could also have a "Year" column in your data, then use an element in your naming pattern like ${Blood-${Year}-:withCounter}
to get names like: Blood-2023-1, Blood-2023-2, etc. This could effectively give you the yearly-total tally you may be seeking, on a per-sample-type basis.
I hope one of these helps you get the behavior you're seeking, and happy to help further if not.
--Molly