Truncate word count

Hello all,

One of my customers would like to truncate an excerpt of a blog by the number of words instead of characters. Is it possible to truncate a word count?