Can you solve the Pinocchio "green hats" logic puzzle?

I read into this the opposite premise; to me, that’s one whole statement, that is not separable, or rather doesn’t need to be separated, to determine an answer. IMO, the number of hats he has or whether he has any at all is a MacGuffin, which is why I think the given possible answers are nonsensical. He could have any number of hats including zero, but the lie hinges on if all of them are green, not the number represented by “all”.