For example, we will use grep sort uniq
Commands such as: grep -o -e '[0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+' | sort | uniq -c
grep -o is to output what matches, and as many matches as possible on each line
sort is used to sort, the main purpose is because the following uniq -c counts the number of consecutive lines of the same content. So you need to use sort to put the same ip arrangement into one piece