If in ṣalāt al‑āyāt one doubts how many rakʿahs he has performed, and having thought about it he does not find an answer, his prayer is invalid.