Isn't this a bit strange?
> String.count("","");
(9) Result: 1
> String.count(" ","");
(10) Result: 0
> String.count(" ","");
(11) Result: 1
> String.count(" ","");
(12) Result: 2
I could understand the series {1,2,3,4}, {-1,0,1,2} and {0,0,1,2}
though.