Part of the confusion might be from the game using confusing terms for everything. If you've ever shredded cards for trading, flairs, etc those will all count as collected but won't show up in the card count when you search through the Dex.
I made an exhaustive list of all my cards from the extensions in a spreadsheet, the total count is consistent with 2617 cards, which is the reason I was trying to understand the mismatch in the first place.
Sorry I'm not of more help. From within the game my numbers all seem to add up if I filter by the same criteria you're using. Either you have a card I don't have or you have some kind of glitch going on lol.
Edit: Actually there is a one card discrepancy, interesting.
The only thing I can think of is that I used to have a card of which I exchanged the last one to a friend because I was wondering what happen when you exchange the last a card you only have one of.
Long story short, the game still show the card's image in the overview and considered the card obtained, but it says you don't have it in the specific card's view.
Maybe that's the reason for the weird behaviour. I don't know how to test it, apart from obtaining a copy of the card again.