I have a file consists of many strings. Looks like
sdfsdf sdfsdfsdf sdfsdfsdf test gggg uff test test fffffffff sdgsdgsdgsdg sdgsdgsdgsdg uuuttt 5
One-liner:
s.split().count('test')