How do I find the count the number of a particular value object in a collection?

This example shows you how to find the count the number of a particular value object in a collection.
package net.javaiq.examples.collections;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;


/**
 * This class demonstrates on how to find the count the number of a particular 
 * value object in a collection
 * @author JavaIQ.net
 * Creation Date Dec 10, 2010
 */
public class CollectionValueObjectSizeFinder {

    /**
     * Method to count the number of value objects in a given collection
     * @param coll -- the Collection to find the values.
     * @param val -- the value to compare each of the elements to.
     * @return size -- the number of value objects in the passed Collection
     */
    public static int getNumberOfValueObjectsInCollection(Collection<Object> coll, Object val) {
        int numOfValueObjectsInColl = 0;
        if (coll != null) {
            for (Object collObj: coll) {
                if (collObj != null) {
                    if (collObj.equals(val))
                        numOfValueObjectsInColl++;
                } else {
                    if (val == null)
                        numOfValueObjectsInColl++;
                }
            }
        }
        return numOfValueObjectsInColl;
    }

    /**
     * Tests getNumberOfValueObjectsInCollection method with sample inputs
     * @param args
     */
    public static void main(String[] args) {
        List list = new ArrayList();
        list.add("Google");
        list.add("Yahoo");
        list.add("Bing");
        list.add("Google");
        int num = getNumberOfValueObjectsInCollection(list, "Google");
        System.out.println("Value object count in the collection :: " + num);
    }
}