This will keep the defined amount. All other instructions merely delete all revisions and/or use SQL … ending up with many orphaned records on other tables.
https://github.com/trepmal/wp-revisions-cli
wp-cli package install git@github.com:trepmal/wp-revisions-cli.git
wp-cli revisions clean {keep}