#!/usr/bin/env tclsh8.6 set n 0 while {[gets stdin line] >= 0} { set words [split $line { }] foreach word [lrange $words 11 14] { switch -- [string length $word] { 2 - 3 - 4 - 7 {incr n} } } } puts $n