The team at Niantic has recently pushed a little update in the background to Pokémon GO that allows the Pokémon you see at gym locations to be counted in your Pokédex as "seen" Pokémon. Before this update, any Pokémon in your Pokédex that were listed as ones you've seen before are ones that you would have encountered while exploring, and not the ones you've encountered at gyms. This changes now that the update is pushing out to devices, but there are a few noteworthy details that are worth mentioning. As pointed out by the original poster on Reddit who has clarified this feature was added, this isn't going to affect every single Pokémon you've ever seen at a gym since you've been playing.
To elaborate on this, what actually seems to be the case, according to the OP, is that this update was designed to affect your Pokédex "seen" list moving forward, so those you would have seen at gyms in the past are not counted in the way this feature was meant to provide. This update follows up a recently rumored update to the game which has yet to push out to users, but will end up making it easier for players to find rare Pokémon when playing.
Other details worth mentioning about this new feature are that if you happen to see a Pokémon at a gym that you have yet to actually catch, the seen Pokémon is counted as what the poster on Reddit is referring to as a Phantom "Seen: 1" Pokémon in the Pokédex, and once you have actually encountered and caught that particular Pokémon in the wild, say a Squirtle for example, then the number count of that particular Pokémon which you've seen both in the gym and in the wild would stay at two instead of one. Essentially, this will affect your counts for Pokémon seen vs caught, which of course will not matter to all players but it would appear that it isn't going over well with some users, as comments on the Reddit thread seem to suggest. If you haven't noticed these changes yet, chances are the update may not have reached your device yet.