select count(1) from information_schema.COLUMNS where TABLE_SCHEMA='$databaseName' and table_name = '$tableName'