どんなに/どれほど/何度/どれだけ/いくら … + [verb (plain)] + ことか
どんなに/どれほど/どれだけ/いくら … + [i-adj (plain)] + ことか
どんなに/どれほど/どれだけ/いくら … + [na-adj (plain)] + ことか
どんなに/どれほど/どれだけ/いくら … + [noun] + ことか
Note: Almost always preceded by an interrogative word (どんなに, どれほど, 何度, どれだけ, いくら, etc.). The sentence is a rhetorical exclamation, not a real question.
ことか is an exclamatory expression used to convey strong emotion about the extent or degree of something. It typically appears with interrogative words such as どんなに (how much), どれほど (to what extent), なんど何度 (how many times), どれだけ (how much), and いくら (how much). The speaker uses it to express that the degree is so great it cannot be adequately put into words – similar to English "how…!" or "god knows how…".
The pattern is: Question word + … + ことか. The clause before ことか is in plain form (past or non-past). The sentence is not a real question – it is a rhetorical exclamation.
ことか carries a strong emotional charge – gratitude, frustration, sadness, joy, or nostalgia. It is often found in written language, speeches, and heartfelt statements, though it can also be used in conversation for dramatic emphasis.
In polite speech, ことか can become ことでしょうか.