I'm the developer of the R Project app and currently working on issue #13.
When executing this...
index=_internal | r "output=data.frame(count=nrow(input))"
... it returns a count column with one row containing the number of events that are passed from the search (which is implicitly a search command) to the r command. But it's limited to the maxresultrows setting.
Based on what I see limits.conf documentation, that's the expected behaviour.
However, when executing this...
index=_internal | stats count
.. it returns the actual event count (which is not limited!), to me that's an unexpected behaviour.
Why is the number of search results not limited when passing piping the events to a stats command?