Optimize Cursor.count() when no filter is supplied for a 10x performance improvement on both IndexedDB and Memory.