my $count = grep {$_} values %state;