When I was in primary school we were told once by one teacher that if "twice" sounds correct in a sentence that you should never use "two times" instead. Has anyone else encountered this "rule" before? I have found the following similar questions (and more) but none of them answer my question.
It has happened two times before. - Replace with "twice"
24 is two times as large as 12. - Replace with "twice"
It only happened the last two times. - "twice" sounds wrong, don't replace
Note: "It only happened the last one time" sounds weird. You would say "It only happened the last time".
So was our teacher's rule right or is "two times" correct and "twice" usually more correct?