Description:
When programming, in my experience count is used for two reasons:
1. To find an accurate count of rows.
2. To make a decision.
In case 2, what I as a programmer most often needs to know is are there 0, 1 or more rows.
For these cases, I suspect that there are optimizations that could be applied if the engine knew that a full count was not required.
How to repeat:
Feature suggestion
Suggested fix:
I suggest a variation on COUNT syntax that includes the information that a full count is not needed.
Perhaps COUNT ... WHERE DECISION or COUNT WHERE BRANCH or COUNT WHERE IF. ALternatively perhaps COUNTIF would be better. A more general version could allow the programmer to decide the break points. For instance, if there's a small amount of data (e.g. 30 rows) then I often find myself displaying it one way, but if there are more then I display it in a more concise form. Perhaps COUNTIF (0, break1, .... breakn), returning an integer 0 for the first, 1 for <= break1, etc.