PostgreSQL has MVCC, which is awesome until you want an approximate count on what could be a long view...until now. Here's how.
First, a little blocking and tackling:
CREATE OR REPLACE FUNCTION countit(regclass)
RETURNS float4
LANGUAGE plpgsql AS
$$DECLARE
v_plan json;
BEGIN
EXECUTE format('EXPLAIN (FORMAT JSON) SELECT 1 FROM %s', $1)
INTO v_plan;
RETURN v_plan #>> '{0,Plan,"Plan Rows"}';
END;
$$;
Now we have a very quick, essentially O(n*explain) for n views, way to get approximate counts. Thanks to Matheus de Oliveira for writing most of the function as you see it here. Thanks also to Kevin Murphy for mentioning that using JSON rather than JSONB allows people running PostgreSQL 9.3 to join this fun. [Edit: 2017/08/22] Thanks also to Andrew Gierth for clarifying that EXPLAIN is more accurate than what's in pg_class.reltuples.