You must switch
countip=$totalip
to
totalip=$countip
otherwise totalip
will never be updated.
OT: You could simplify the initial filter to
awk '/WACSLAW1 CRITICAL INCOMING/ && $14 !~ /192.168.1./ && $14 !~ /IN=eth1/ && $14 !~ /MAC/ { print $14 }' /var/log/messages