SELECT COUNT(*) FROM pg_stat_activity;