Hello, just wondering how to count words up to a point (for example, a period)?

For example, given the string:

That was a fun movie. I want to watch it again. We should sometime.

What code...