The sum of the angles in a quadrilateral is 360° regardless of the positions of the vertices.
When the quadrilateral crosses itself, think of it of as being folded over the diagonal . (The other diagonal could be used instead.) Then the angle (and ) overlaps itself and the common part is counted twice.