In "count" queries, do not add all the columns from relations.

This can make the difference between using no indexes and writing to disk for a
temp table and bringing down the system versus using indexes and completing in
a few milliseconds.

The comment "// Remove the current select and" seems to imply that this was the
original idea, but maybe the API somehow got changed which caused a performance
regression without anyone noticing it.

PS: I am unsure what to do with the subselect situation, so I decided to keep it the same
for fear of breaking things. If you have some code that uses this extensively I can
recommend trying to fix that too, it may make a huge difference in performance.