Batch, 117 bytes
@set/ps= @for %%s in ("%s:"=%" "%s:"=""%")do @echo(%%~s>>_ @for %%s in (_)do @set s=%%~zs @del _ @cmd/cset/as/2-2 Doesn't work for the empty string, because there's no safe way to detect it. Works by printing the string twice, once without quotes, once with quotes doubled, then taking the resulting file length, dividing by 2, and subtracting 2 for the CRLF. 93 bytes if support for "s is not necessary, in which case the empty string can be supported (84 bytes without empty string support):
@set s= @set/ps= @set n=0 :l @if not "%s%"=="" set/an+=1&set "s=%s:~1%"&goto l @echo %n%