@Override
    public <T extends PersistentObject> long count(Class<T> entityClass) {
        long count = 0;
        for (Map.Entry<Long, PersistentObject> entry : dataStore.entrySet()) {
            if (entityClass.equals(entry.getValue().getClass())) {
                count++;
            }
        }
        return count;
    }