Pokémon fought in Raid Battles raise the 'number battled' counter in the PokéDex, just like any normal Wild Battle. Although Pokémon fought in the Battle Tower and your allies in Raid Battles do not raise the 'number battled' counter in the PokéDex, just like multiplayer battles do.
Source: I did it myself (i even got a shiny Magikarp thank you Gekky).