definitionExpression, filter, featureEffect — and the feature count you can actually quote
Three properties all narrow a feature layer and they are not interchangeable. definitionExpression changes what reaches the browser, filter changes what draws out of what already arrived, and featureEffect only changes how it draws — and none of them is a security boundary. Plus the three layer view flags that decide whether the count in your results panel is a fact or a guess, a worked results-panel build, and the fourth lever most articles leave out.