I read the following and was wondering if it was grammatically correct? Can we use this if the person just moved from that place and you run into him in a new place?
For how many days have you been there?
English Language & Usage Stack Exchange is a question and answer site for linguists, etymologists, and serious English language enthusiasts. It only takes a minute to sign up.Sign up to join this community
If the person is still in the place referred to as there, then the question How many days have you been there? (present perfect) is the only grammatically correct choice.
If the person is no longer there, then the question must be How many days were you there? (past simple).
Note: how many is sufficient; it doesn't need to be for how many.
The question "For how many days have you been there?" is not quite grammatically correct. "How many days have you been there?" is a more natural phrasing. However in the linked item, the question is redundant with the question after it and should be deleted instead of being rephrased. Note, the item is riddled with clumsy contructions one should avoid, not emulate: "The idea ... pursued her mind" ludicrously personifies idea; "The winds were light ... howling softly" is inconsistent nonsense; "Tom ... was standing in front of his hooded members" is risible. Tense or mood problems include use of "was acting", "would repeat", "would resurface", "would not believe" (and many more such) instead of "acted", "repeated", "resurfaced", "didn't believe".