Use an array length in the API instead of explicit item count.