You can use optimizer trace to get more knowledge about how the optimizer executes the query and why. For this particular case, the trace does not explicitly tell how many times the count is computed, but we can get information about the temporary table that is used to perform the aggregation:
mysql> SET optimizer_trace='enabled=on';
Query OK, 0 rows affected (0,00 sec)
mysql> SELECT c2, COUNT(c2) FROM temp GROUP BY c2 HAVING COUNT(c2) > 1;
+------+-----------+
| c2 | COUNT(c2) |
+------+-----------+
| 1 | 2 |
| 2 | 2 |
+------+-----------+
2 rows in set (0,00 sec)
mysql> SELECT trace->'$.steps[*].join_execution.steps[*].creating_tmp_table'
-> FROM information_schema.optimizer_trace;
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| trace->'$.steps[*].join_execution.steps[*].creating_tmp_table' |
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| [{"tmp_table_info": {"table": "intermediate_tmp_table", "location": "memory (heap)", "key_length": 5, "row_length": 23, "unique_constraint": false, "row_limit_estimate": 729444}}] |
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0,01 sec)
mysql> SELECT c2, COUNT(c2) AS c FROM temp GROUP BY c2 HAVING c > 1;
+------+---+
| c2 | c |
+------+---+
| 1 | 2 |
| 2 | 2 |
+------+---+
2 rows in set (0,00 sec)
mysql> SELECT trace->'$.steps[*].join_execution.steps[*].creating_tmp_table' -> FROM information_schema.optimizer_trace;
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| trace->'$.steps[*].join_execution.steps[*].creating_tmp_table' |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| [{"tmp_table_info": {"table": "intermediate_tmp_table", "location": "memory (heap)", "key_length": 5, "row_length": 14, "unique_constraint": false, "row_limit_estimate": 1198372}}] |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0,00 sec)
For the above we see that row size for the temporary table is smaller (14 vs 23 bytes) when an alias is used instead of repeating the COUNT expression. This indicates that for your query the counting is done twice during aggregation.