Check type enum in toArray method of CountObjectsRequest