The Count : HackerEarth Problem Solution

The Count : HackerEarth Problem Solution :
          To count number of words in a given line of text.

Input:

3
i am   awesome
so     here     i am     again
adios     amigos

Output:

3
5
2

PHP Implementation: