Don't fetch visualizations for count

@Kartones CR this, please. This change should lead to a big improvement in some queries, because it replaces fetch + count with an only count, avoiding fetching every matching row (key for users with many tables). I've extracted two methods from fetch code so I can add a `count` easily. Check it carefully :-)