For me, my overall duration will be 7 or 8 years. My school does an abbreviated 4th year of med school, plus we do 2 months of clerkships prior to grad school. Therefore, I'll have either 4 or 5 years in grad school (it all depends on whether I can finish my dissertation in the next month, which I'm not too optimistic about at this point). One of the main "complaints" about doing epidemiology (or other public health fields) is that there is a lot of coursework and not much overlap with the medical curriculum, which means we may do more time prior to our comps than most MD/PhD students. (As a rough guideline, at my school, the lab students tend to do about 1 year coursework then 3 years in the lab, whereas I was 3 years of coursework and 1 year post-comps research).
As for the time to get data, it depends. One option is to find a good source of pre-existing data that you could analyze. This is what I'm doing for my main dissertation project. We do have a primary data collection requirement, which I'm fulfilling with another small pilot study. But, even with an original study, you can form your dissertation committee early in your graduate school career and possibly start collecting data prior to passing your comps.
As for enrolling in the master's - that may depend on the school. Again, my school typically would expect you do have a master's before applying. If you just have a BS, they would accept you as a master's student until you completed that degree, and you take a phd qualifying exam. However, as an MSTP student with 2 years of med school curriculum, they didn't mind me not officially having a master's. (In fact, I could have just gotten one along the way but my PI said wouldn't get me anything).
If you've already narrowed down your schools, it might not hurt to let them know your interests. They might offer some good suggestions for how to streamline things.