for _ in range(int(input())):
    full_str = input()
    full_list = list(full_str.split(" "))
    #print(full_list)
    lenght = len(full_list)
    print("Count =", lenght)
for _ in range(int(input())):
    full_str = input()
    full_list = list(full_str.split(" "))
    #print(full_list)
    lenght = len(full_list)
    print("Count =", lenght)
#print(full_list)