Search for a pattern in a String file and count the occurance of each pattern

view story

http://www.unix.com – I am trying to search a file for a patterns ERR-[0-9][0-9][0-9][0-9][0-9] in a file and return a count for each of the error reported Input file is a free flowing file without any format example of output ERR-00001=5 .... ERR-01010=10 ..... ERR-99999=10 (HowTos)