How to truncate a string after n number of words?

The result of the snippet: