count string frequences in text
measure time execution of function counting string