How to count all relationships in a database?
SELECT COUNT(*) FROM information_schema.tables WHERE table_type = 'BASE TABLE' --counts all tables
SELECT COUNT(*) FROM information_schema.referential_constraints --counts all FK relationships