You will need at least a short conveyor.
sed -e 's/\([0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+\).*$/\1/' -e t -e d access.log | sort | uniq -c
What each IP will print (will only work with ipv4, though), sorted with the count prefix.
I tested it with apache2 access.log (it is configurable, so you will need to check) and it worked for me. The IP address is assumed to be the first on each line.
IP- ( 4 , ) . -e t , , -e d ( IP-). sort sorts..:) uniq -c (, , ).