How many astronauts have been to space?
At the start of 2021, the number of people who have been in space was 569. This number continues to increase each year.
It's worth noting that there is more than one definition of "space", and what it means to be "in space". The most commonly-accepted definition is 100 km above sea level. The United States has used a definition of 50 miles above sea level, which allows for some military personal to qualify as astronauts. However, most US scientists and the entire rest of the world use the definition of 100 km as provided by the Fédération Aéronautique Internationale (FAI). Outside the US military, no one really takes the 50 mile definition seriously.
How many astronauts have been to other planets?
No astronauts have ever visited another planet. The only other celestial body that people have been to is the Moon, which isn't a planet. The first planet that people will visit is probably Mars.