I have a code that accesses the database every second and returns me the number of rows in a table, the problem is that an abusive number of requests and queries are made in the database to monitor changes in the rows, I need of something that monitors changes in the database and returns me only the result when there are changes in the number of rows, how can I do that?