Also posted at Counting element(s) in array(s) - Dev Shed
and
http://www.java-forums.org/new-java/62343-counting-element-s-appearance-s-arrays.html