If I get you correctly, you want to know whether there were any matches while performing the operation. You could simply use two statements.
boolean anyMatch = users.stream().anyMatch(u -> u.count > 0);
if(anyMatch) users.stream().filter(u -> u.count > 0).forEach(u -> u.setProperty("value"));
Since anyMatch
stops at the first matching element, there would be redundant work only if there is a long prefix of non-matching elements before the first match.
If that’s a concern, you could use
Spliterator<User> sp = users.stream().filter(u -> u.count > 0).spliterator();
boolean anyMatch = sp.tryAdvance(u -> u.setProperty("value"));
sp.forEachRemaining(u -> u.setProperty("value"));
instead.