Although this was marked wrong, it seems correct: "How many years was he buying cheese and milk from her?" Can "kupoval" express the past continuous?
I'm not Czech but I'm almost sure you're right. It was also my answer and I reported it.
how is the "he has been buying" implied here? (as opposed to "he was buying")
The suggestion I got was 'how many years did he buy cheese and milk from her?' I thought you were representing aspect in English through continuous/ non-continuous tenses?
I wrote: "How many years had he been buying from her cheese and milk?" and got marked wrong. Why is that?
The suggested word order is odd.