Hey Scott,
The technical explanation is that Slack unfortunately doesn't give direct access to their official member count, but rather forces apps to approximate this based on the number of users in the original #general channel (you might have changed this name), which all users are required to join.
So you're right, there might be a discrepancy there around invited users. But I'm also thinking it includes any bot users that are in the channel.