Simplify new card count query.

The altered query had an extraneous subquery that itself can be counted, rather than selecting a whole cursor of ids, to then select cards matching those ids and count them. If sqlite were able to optimize that out, there will be no performance benefit (though the query is more direct), but I suspect it was not optimized down to this version.