SELECT COUNT(*) FROM tablename
SELECT count(*) FROM information_schema.columns WHERE table_name = 'Your_table_nale';