Like
ことに,
ことか is a grammar point that utilizes the kanji 殊(こと), meaning 'particularly' (in terms of a large amount). As these structures regularly appear in hiragana, they are not to be confused with 事(こと) 'thing'. こと is a combination of 'particularly', and the
case marking particle か, presenting a question.
In sentences with
ことか, words that highlight some particular number or extent are often used, before
ことか comes at the end of the statement, expressing that 'extent' as being particularly unusual, or even unbelievable (thanks to the addition of か). This is often translated simply as 'how (A)', 'what (A)', or even 'god knows (A)'. Let's look at a few examples.
あの人(ひと)のコンサートには何回(なんかい)いったことか。
God knows how many times I have gone to that person's concert.
うちの犬(いぬ)はどんなに可愛(かわい)いことか。こんなに可愛(かわい)いワンチャンは他(ほか)にはいないはず。
How can I explain how cute my dog is? There is no other dog as cute as her.
なんて暇(ひま)なことか。こんなに暇(ひま)なのは久(ひさ)しぶりだ。
God knows how bored I am. It's been a long time since I've been this bored.
息子(むすこ)を一人(ひとり)で電車(でんしゃ)に乗(の)せるのがどれだけ心配(しんぱい)であることか。
God knows how worried I am to let my kid on the train by himself.
Literally,
ことか can be translated as 'to what particular (A) is (B)!?', as the enquiry is often not directed at anyone specifically, but instead presents itself as a question simply to emphasize its magnitude.
In modern Japanese, this expression is used primarily in written language, and has a tendency to sound either poetic, or dramatic. Because of this, it may sound unnatural in daily speech, unless the speaker is purposely being dramatic.
どれだけお前(まえ)の事(こと)を愛(あい)していたことか!それでも俺(おれ)はお前(まえ)に裏切(うらぎ)られた!
God knows how much I loved you! Still, you betrayed me.
知(し)らない人(ひと)にありがとうと言(い)われるのがどれだけ嬉(うれ)しいことか。
God knows how nice it feels to have a stranger thank you.