// "Replace with count()" "true" import java.util.List; import java.util.Set; public class Main { public void test(List> nested) { int count = 0; for(Set element : nested) { if(element != null) { for(String str : element) { if(str.startsWith("xyz")) { ++count; } } } } } }