I was curious and wondering: How many different types of Lego bricks have been produced since the start of the company in 1949?
Around 18,000 as of October, 2020
A 2020 article on Brickset discusses part numbers that give us a rough idea.
Design numbers identify the shape of the part. ... Our database contains around 18,000 design numbers but many more have been allocated over the years but are now out of use, following parts being discontinued or redesigned, at which point they are given a new one.
One source places the number of different types of LEGO elements that have been made at 2,200. It is unclear whether or not DUPLO, Clikits, or Bionicle etc, etc, are included in that count.
How Many Different Types of LEGO Elements Exist? 2,200 different elements—or types of pieces
How Many LEGO Elements Are Manufactured? Approximately 19 billion each year or, 2 million per hour or, 36,000 per minute
It really depends on your definition of a part. Does Duplo count? Do things like Lego branded paraphernalia with studs on them count? What about pre-ABS bricks? The old architecture sets? Do you count all the minor design changes as 'unique' elements? (The classic 2x4 brick has had probably a dozen minor changes to the molds over the decades, for example). You probably aren't considering color variations, but physical shape. Are pieces with differing paint jobs unique elements? A radar dish that is opaque is probably going to get use differently from a transparent one with space ship canopy lines on it...
I get the nature of your question, but depending on how you define it can have a big impact on the answer. I would throw out an order or magnitude answer and say that there are probably less than 10k physically unique pieces in existence. Anything more is going to involve a lot of decisions around what exactly is 'Lego'.
Any philosophy majors out there that are looking for a thesis, there you go. That one's on me.
One source I found mentions that there are around 4000 different LEGO elements:
There are now around 4,000 different elements, as they are called at LEGO: round bricks, square ones, wheels, gears, and bricks with and without knobs.