According to this website (http://www.jlptsensei.com/grammar-lesson/kotoka/) "ことか is used to place strong emphasis on something." This is the only explanation I could find. I was wondering if that is a common expression and in what context would you use it? Thank you.
The ことか is used in an exclamatory sentence (感嘆文) , usually preceded by an interrogative word such as どんなに, どれほど, なんと, 何度 etc.
Examples:
- どんなにうれしいことか! (≂ どんなにうれしいだろう!)
How happy I would be!- なんと美しいことか! (≂ なんと美しいのだろう! / なんて美しいんだろう!)
How beautiful it is!- 何度失敗したことか! (≂ 何度失敗しただろう!)
(I have no idea) How many times I have failed!
(「~~ことか!」 sounds a bit more literary than 「~~だろう!」)