pg: don't try to count(*) if have too many (default 100000) rows