How can I accurately count commas in a string, preferably with @count? Basically, I have some strings that should not contain commas but sometimes do. I can convert any commas to spaces with @replace and then replace any double spaces with a single space. But, if there are no commas, I want to leave the string alone -- even if it has double spaces. I have tried a number of variations of @count but none of them work, e.g: Set x=abc, 123, def echo %@count[,, %x] echo %@count[^,, %x] echo %@count[",", %x] echo %@count[`,`, %x] echo %@count[',', %x] echo %@count[%@char, %x] I have tried %@fields[",",%x] However, for Set x=abc it returns 1, meaning there is one field, so I would have to do %@dec[%@fields[",", %x]. That's pretty convoluted just to "count the commas". It seems a built-in @count function should be able to do that.