Do you really need to do equivalent of group by true? If you’re just counting it, you should be good just doing the length of your original result set.
However, we’re here to your aid, and there are two things which needs to happen. The first is vital, and the second might be unnecessary (as suggested above).
In dataviewjs you can’t use this, you need to use dv.current() instead. The group by clause is usually written like: .groupBy( p => p.file.name) to group on the file name, but in your case I reckon you could use something like .groupBy(p => true).
I’m not coherent tonight, so maybe the following would work: