Fix luacontroller: attempt to perform arithmetic on global 'print_count' (a nil value)