string count(string haystack, string needle)
This function counts the number of times the needle can be found in haystack .
Intersections between needles are not counted, ie count("....","..") is 2.