You can create a variable to use it as a counter. Then in the prompt you can add directly an instruction that says that every time user’s question is related with those topics: (enter here the topics) add one to the variable counter.
Then you evaluate the counter and when it gets the number you want just add an instruction to navigate to another flow.