N3
ことか
How…, What..., God knows...
息子を一人で電車に乗せるのがどれだけ心配であることか。
God knows how worried I am to let my kid on the train by himself.
Explanation
「~ことか」 goes at the end and must go with 「どんなに」, 「どれほど」, 「どれだけ」, 「何度」 or 「何回」, meaning 'how... it was!'. It is not a real question. In question form, it expresses a heartfelt exclamation after a long time, a big sacrifice or deep feeling: 「どんなに嬉しかったことか」 (How happy I was!). It is mostly used in monologues, memories and moving speeches.
Mixed up with
When the first half has 「どんなに」, 「どれほど」, 「どれだけ」 or 「何度」, expect 「~ことか」 at the end. It is not an ordinary question.
「~ことか」 is a strong exclamation (how...!). 「~ものか / ~もんか」 is a strong denial (never, as if!). Only one letter differs and the meanings are opposite, a classic trap.