Data race fix and small allocation optimization

I've made some fixes in racy Sample.Count() methods as well as reduced a number of allocations on non-filled sample updates.