The Download Count returned by the App Store API includes all download types (first-time downloads, redownloads, updates, etc.). However, the App Store Connect interface only displays first-time downloads and redownloads.
To align your data with what is shown in App Store Connect, you must use the Download Type field to filter out the other download types and isolate:
First-time downloads
Redownloads
Excluding updates or other types of reinstalls that are otherwise counted in the raw Download Count.