Amount of words per line using awk NF

Print number of words per each line:

awk ‘{print NF}’ file.txt
If the number of items in the line is 2 then the line will be printed:
awk 'NF==2 {print $0}' file.txt
Eliminating the blank lines:
awk ‘NF>0 {print $0}’ file.txt