how to find number of words

please
help me for this
"divide the file into multiple files containing no more than 50 lines each and find the number of words of length less than 5 characters"

Is this a homework question?

Give an explanation of your real world problem and show us what you've gotten so far.

use
split -l 100 myFile

will split the myFile into pieces with 100 line in each files.
File will be start with prefix xaa,xab etc
you can change the prefix

check man split

Idea for basic construct to make the input data easier to deal with. We change the delimiter between words to a newline character with "tr" then process each word as one line. My example uses older shell techniques. If you have ksh95 you can easily find out the number of characters in a parameter without using "wc" or for that matter do integer arithmetic without using "expr". The "echo" with the "\c" is to echo without a newline which makes the character count in "wc" correct (in some shells you need to use "echo -n ...").
It always helps when posting on this forum to state which Operating System you have and which shell you prefer. Good luck.

COUNTER=0       # Count of words less than 5 characters
cat file.ext|tr ' ' '\n'|while read WORD
do
        SIZE=`echo "${WORD}\c"|wc -c`
        if [ ${SIZE} -lt 5 ]
        then
                COUNTER=`expr ${COUNTER} + 1`
        fi
        echo "${WORD}:size ${SIZE}"
done
echo "Words of less than 5 characters: ${COUNTER}"