The first count (592) includes edits to your own posts, and only counts specific types of edits (excluding title and tag-only edits for example).
(To verify, I made a (justifiable) edit to an older post of mine and my count rose by 1. Making another (justifiable) edit to a post I already edited this week and the count rose. I then removed a useless tag name from a question title, and the editors-tab count did not change. Similarly, edits that only add or remove tags do not increase the count either).
The Data explorer query you used counts unique edits; editing a post twice counts as two edits. The badge counts edits to unique posts, where two edits to one post count as one edit for the badge.
To get unique posts instead, query for COUNT(DISTINCT PostId).
For the copy editor badge, a series of types of edits are excluded, prominently edits to your own posts.