Basically i need to sort a file by the number of words so in example if the file contains the following text:

1. This is Fourth
2. This is the second line
3. This is the Third
4. This is the first line of words

I would need it to be sorted to this:

1. This is the first line of words
2. This is the second line
3. This is the third
4. this is fourth

So sort by the number of words on a line.