I would perform the following steps in Denodo to implement your scenario:
1. Create a derived view to check the record count of two different views. For example, one count from the Data Source and the other count from the Cache table.
2. Create a new [VDP type job](https://community.denodo.com/docs/html/browse/7.0/scheduler/administration/creating_and_scheduling_jobs/jobs/jobs#jobs) in the Scheduler to execute the view periodically.
3. Configure the [Exporters](https://community.denodo.com/docs/html/browse/7.0/scheduler/administration/creating_and_scheduling_jobs/configuring_new_jobs/postprocessing_section_exporters#postprocessing-section-exporters) and [Handler](https://community.denodo.com/docs/html/browse/7.0/scheduler/administration/creating_and_scheduling_jobs/configuring_new_jobs/handler_section#handler-section) sections of the job to export the output and to send the email alert.
As stated in the Handlers section of the User Guide, currently, it is only possible to send the email in three different conditions.
To send the email only in case the count is not matching, I would create my own JAVA based [Custom Handler](https://community.denodo.com/docs/html/browse/7.0/scheduler/administration/developer_api/extensions_plugins/handlers#handlers) using [Denodo4E](https://community.denodo.com/docs/html/browse/7.0/denodo4e/index#denodo4e-user-guide) extension available in the directory <DENODO_HOME>/tools/denodo4e, and deploy the developed Custom Handler in the Scheduler Server.
You could also refer to the [Scheduler Server Configuration](https://community.denodo.com/docs/html/browse/7.0/scheduler/administration/administration/server_configuration/server_configuration#scheduler-server-configuration) section of the Scheduler Administration Guide to get more details.
Hope this helps!