This を particle does not necessarily represent the object marker. Let's explore why.
くつを一足 (one pair of shoes)
This を is used in connection with counters. It does not necessarily indicate a direct object here. According to the answer found here (and here), when working with counters, you can use the following structure:
(Noun) (Particle) (Number + Counter) (Verb/Verb Phrase)
But where is the verb in this case? So far, we have Noun を Number + Counter
but no Verb. This is because there is yet another noun used in relation to the verb. (You aren't just buying a pair of shoes, you're also buying a pair of socks.)
The key here is the fact that there is a と in this sentence. In this case, と is used for making a list--translated to and
in this case.
I want to make a special note that くつを一足
is a noun phrase. In other words, it acts like a single noun in terms of sentence creation. The same goes with くつ下を四足.
These both combine to be the direct object. This grammar structure is not uncommon, as you will see in the other answers above, but a good rule of thumb goes like this:
(Noun) (Particle) (Number + Counter) と (Noun) (Particle) (Number + Counter)
(repeat if necessary)+ (Verb/Verb Phrase)
くつを一足とくつ下を四足 + Verb Phrase (one pair of shoes and four pairs of socks + verb phrase)
So what's the direct object? In this case, it's the part of the sentence just above in yellow. One pair of shoes, and four pairs of socks
is our direct object.
We are combining two different ideas into one sentence here:
くつを一足買いました。
くつ下を四足買いました。
Putting it together, we can either say:
くつを一足とくつ下を四足買いました。
くつ下を四足とくつを一足買いました。
Should we include the counters as part of the direct object? Well a direct object applies to a noun. The phrase noun+number+counter
is a noun phrase, acting as a noun. So I would say yes.
Hope it helps.