As the help text in the Add Comment box states:
Use comments to ask for clarification or add more information. Avoid comments like "+1" or "thanks".
So as long as the comments are improving the post, they should be fine. If you are having a discussion about it, it belongs in chat/meta.
In the end, comments can be deleted later, so no big issues with having too many (so long as the post is improved and the comments are then cleaned up).
As far as how the system determines when it pops up, it is not strictly the number or comments. This question has 14 comments but I am not given the option to "Continue in chat". It also does not appear to be 2 users commenting back and forth. This question has 7 comments between me and the OP but I still do not have this "Move to chat" option.
So to get the "move to chat" it must either require more then 7 comments between users, more then 14 total comments, or pick up on certain keywords.