This is the first time I got this sentence (and it's to compose the sentence in Greek) and I honestly found it quite challenging for such a simple sentence. For a loose translation this seems fine, but for a more literal translation it's very confusing to have the subject and the direct object flip flop (to me the supplied English sentence is another way of saying "A square has how many angles?", regardless of word order to me "square" seems to be the subject in the English sentence, but maybe I'm wrong?)
Can έχει act like a passive verb, because to me that is what it seems like, as angles don't have squares (but squares do have angles).
The square is the subject in the English and also in the Greek sentence.
You can see that έχει is in the "he, she, it" form and agrees with the singular noun ένα τετράγωνο and not with the plural noun πόσες γωνίες -- otherwise it would be έχουν "they have".
But the question word comes first, as in English -- we don't (usually) say "A square has how many angles?". Even if the question word is the object of the verb.
Often, you can tell from the verb and/or the cases which is the subject and which is the object, but sometimes it's ambiguous, e.g. πόσα κορίτσια βλέπουν τα αγόρια; could be either "How many girls see the boys?" or "How many girls do the boys see?".
You can use tetragon = τετράπλευρο to mean any polygon with 4 angles.
τετράγωνο = square is 1. a specific tetragon with all angles = 90° and all sides equal 2. a three dimensional quadrangle (γωνία is both angle and corner)
This is really a mess and in mathematics!! Tetragon comes from τετράγωνο of course, but they are not the same thing