$hash{$_}++ for (@array); # same as above only with the for at the end