public Integer getElementCount(Class<? extends State> state) {
        // Initialize a temporary counter
        //
        Integer count = 0;

        // Process the special case of a null parameter
        //
        if (state == null) {
            for (Element[] w : population) {
                for (Element e : w) {
                    if (e != null) {
                        count++;
                    }
                }
            }
            return count;
        }
        for (Element[] w : population) {
            for (Element e : w) {
                if (e != null && e.getCurrentState().getClass().equals(state)) {
                    count++;
                }
            }
        }
        return count;
    }