Super slow MariaDB 5.5 count(*) on large simple table
It's reading the entire 12M rows in the index.  Yes, it is doing an index scan, not a table scan, but that is really the table (only 2 columns), then the index is as big as the data.

Do not use CHAR(...) unless the data is constant length.  I suspect the average length for a "domain" is somewhere around 20.  Changing to VARHAR(120) will shrink the data and the index by a factor of maybe 5.  This shrinkage will probably speed up the full scan by a factor of 5, and help the other queries some.

What was the setting of innodb_buffer_pool_size?  It should not have been more than about 500M.  The data is about 2GB, as is the index.  So you had to read most or all of the index from disk.  That is, the buffer_pool could not have cached it all, so you were I/O-bound.

Switching to 8GB of RAM and increasing innodb_buffer_pool_size to, say, 5500M, will perhaps let it cache the entire index, thereby running the full query in 6 seconds instead of 60.  Add to that, my suggestion about CHAR, and it might go below 2 seconds.