CartoDB/cartodb — pull request #1517 by juanignaciosl (2014-12-18 10:38:26+00:00)
Title: 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 :-)