The number has been increasing over time and as far as I can tell it now depends which version you are playing.
As far as I can tell in the PS3/XB360 edition you now get up to 3 properties with up to 10 cars each for a total of 30. In the PS4/XBONE/PC edition you get up to 5 regular properties with up to 10 cars each for a total of 50.
But it doesn't end there, Rockstar keep adding new property types to the PS4/XBONE/PC version of GTA online, many of which come with options for vehicle storage. Adding up the numbers on to the GTA wiki I count a total of 189 slots that can be used for regular cars (plus others that are motorbike only or reserved for special vehicles).
If you run out of slots in a garage when trying to add a vehicle to it (either a newly stolen vehicle, a newly bought vehicle, or a vehicle moved from another garage) you will be asked which of the current vehicles in the garage you want to get rid of to make room.