Why does my friend have fewer Pokémon than me?

As with every main series Pokémon game, the Pokédex will always only display spots up to Pokémon you've seen. In your case, since you've caught an Aerodacyl, you can only see up to number 142, even though there are more Pokémon after it. In your friend's case, he has caught an Omanyte, but no Pokémon after it, so the Pokédex will only go that far.


The pokedex always displays all the pokemon up to the one with the highest index

You just have already caught a pokemon with a higher index (142, just the number of aerodactyl in the dex, nothing more, nothing less) in your pokedex than your friend (138).

If your friend caught an aerodactyl his pokedex will be updated and will also show all the indexes until 142.

Say you catch a snorlax, the last entry displayed in your pokedex will be number 143.