1. Restart the server (mysqld).
2. Run the SELECT COUNT(*) -- it takes a rather long amount of time, correct?
3. Run it again -- now it takes 0.00 seconds, correct?
4. Run it again, but with an extra spacing in the SELECT -- slow again, correct?
5. SHOW VARIABLES LIKE 'query_cache%'; -- type = ON, correct?
Read about the "Query cache". Then abandon your extra table. The QC can do the job for you, and do it correctly every time. However, it will be slow after any changes to the table.
While you munch on that, I'll explain why your extra table takes slightly longer. The SELECT from that table happens right after you stored the new count. That means that the QC needs to be refreshed for that table. So, it cannot use the QC, and must actually fetch the value.
SHOW VARIABLES LIKE 'innodb%';
How much RAM do you have?
A typical cause of sluggishness in InnoDB is lack of tuning the buffer_pool_size. See
http://mysql.rjweb.org/doc.php/memory