According to wikipedia, there is currently 2540 games on the Nintendo Switch vs 2523 games for the Xbox One despite being only at the middle of its lifecycle.
- https://en.wikipedia.org/wiki/List_of_Nintendo_Switch_games_(A%E2%80%93L)
- https://en.wikipedia.org/wiki/List_of_Xbox_One_games_(A%E2%80%93L)
And the PS4 has currently 2704 games: https://en.wikipedia.org/wiki/List_of_PlayStation_4_games
To put in perspective, here is different number of games for consoles:
- PS2: 4489 games
- PS1: 3070 games
- PS3: 2204 games
- Xbox 360: 2085 games
- SNES: 1756
- Wii: 1546 games
- Saturn: 1092 games
- Mega Drive: 902 games
- Wii U: 773 games
- NES: 715 games
- Dreamcast: 620 games
- Gamecube: 658 games
- N64: 388 games