The COUNT ENCRYPT RULE syntax is used to query the number of encrypt rules for specified database.
CountEncryptRule::=
  'COUNT' 'ENCRYPT' 'RULE' ('FROM' databaseName)?
databaseName ::=
  identifier
databaseName is not specified, the default is the currently used DATABASE. If DATABASE is not used, No database selected will be prompted.| Column | Description | 
|---|---|
| rule_name | rule type | 
| database | the database to which the rule belongs | 
| count | the number of the rule | 
COUNT ENCRYPT RULE FROM encrypt_db;
mysql> COUNT ENCRYPT RULE FROM encrypt_db;
+-----------+---------------+-------+
| rule_name | database      | count |
+-----------+---------------+-------+
| encrypt   | encrypt_db    | 2     |
+-----------+---------------+-------+
1 row in set (0.01 sec)
COUNT ENCRYPT RULE;
mysql> COUNT ENCRYPT RULE;
+-----------+---------------+-------+
| rule_name | database      | count |
+-----------+---------------+-------+
| encrypt   | encrypt_db    | 2     |
+-----------+---------------+-------+
1 row in set (0.01 sec)
COUNT, ENCRYPT, RULE, FROM
