It's difficult to precisely answer your question, because they are not public information and depend on the aircraft sub-model, customer configuration, etc.
I built this approximate plot using the data from  that shows the trend in Airbus models:
It should be quite surprisingly to you that the A380 has the same number of computing units of the A340. This is because of the transition from the LRUs design to the IMA design (see this question for the difference), that allows to considerably reduce the number of computing units required, called Line Replacement Modules (LRMs). Airbus claims they were able to cut the 50% of the required computers in A350 thanks to IMA approach . A similar claim has been made by Boeing for the 787.
The data does not show the recent aircraft models, but I expect they are still around 100 or slightly above on newer aircraft like A350XWB (which shares most of the A380 avionics). This is because increasing the number of avionics computers is very problematic as it has terrible cascade effects:
This conceptual diagram may look exaggerated, but consider that Boeing claims the reduction of 2000 lbs (~900kg) switching from the LRU approach to the IMA approach . Saving 900 kgs means adding 10 people to the cabin, and it's easy to imagine the money saved by the airlines in the lifetime of the aircraft.
Anyways, check this video which shows the avionics bay of A350XWB: pretty impressive.