Thank you for helping resolve this issue, I have found the code where the problem is caused. It works fine with or without “_count” until it reaches this piece of code and then it causes the problem.
The problem occurs at → view = view.StartKey(filter.StartKey);
If I comment out this line of code it works fine until the System Null Reference error.
any idea why would startkey cause the “Enumeration yielded no results” error ?