Update word count filter

- added check if string is null.
- added check if no match.
 -- returns null if no match.
 -- returns number of words if match.