How to count ip addresses in apache log files:

zcat *.gz | awk '{print $1}' | sort | uniq -c | sort -rn | head