A count is always zero based, where zero means “nothing”.
I haven’t followed your code, but I see you are using Mid, which is 1-based. It also doesn’t need the second parameter if you just want till the end of the string. (I’m not sure that you do, just pointing it out.) There is an equivalent API 2 function that is zero based.
“Count” when it’s the property of a predefined class or datatype in Xojo always means literally, “count” as in “the number of things”. Directory.Count is the number of items in a directory. There can be zero items or there can be a bunch of them. Count means what it says, there’s never any ambiguity.
The argument for Left, Mid, etc is not a count per se, it’s an index, as others have pointed out. Arrays and arrayed control elements like ListBox rows and columns are always 0-based in Xojo, in both API 1 and API 2. String functions like Left, Mid, Right, and Instr are all 1-based, and Instr returns 0 if the search string wasn’t found. In API 2 there are new zero-based equivalent functions with different names, and for the moment, you can use either set arbitrarily - they coexist. The new IndexOf function returns -1 if the search string isn’t found. Pretty sure the language reference has very clear examples of what’s returned for various arguments and example source strings.
Left/Right takes as its parameter a count, as in, “return x number of characters from the start or end of this string”. Mid and Middle take as their first parameter an index, the former 1-based, the latter zero-based.