9
According to this list on Wikipedia nine SpaceX second stages were launched into heliocentric orbits. No other SpaceX rocket went beyond a geostationary transfer orbit (GTO). In launches to GTO the second stage is typically left in a decaying elliptical low-Earth orbit, until it re-enters the atmosphere. (see e.g. here, here or here)
DSCOVR was sent to the Sun-Earth Lagrange point L1. Without station keeping this Falcon 9 second stage will have left this point and is now somewhere on the edge between heliocentric orbit and Earth's hill sphere.
Elon Musk's Tesla Roadster and the second stage that launched it are on an elliptical heliocentric orbit that crosses Mars' orbit.
After a long-duration coast, the Falcon Heavy’s upper stage engine
reignited to give the Tesla and its mannequin passenger enough speed
to break away from Earth’s gravitational grip, sending the car and its
rocket stage into an orbit centered on the sun that will travel as far
away as the asteroid belt.
https://spaceflightnow.com/2018/02/07/spacex-debuts-worlds-most-powerful-rocket-sends-tesla-toward-the-asteroid-belt/
- TESS was launched onto a lunar flyby trajectory, after which the Falcon 9 second stages was placed in a heliocentric orbit:
For the Falcon 9 second stage, the day was not done at TESS separation as SpaceX planned to dispose the upper stage into a heliocentric orbit by firing its engine a third time to escape Earth’s gravitational influence.
https://spaceflight101.com/tess/falcon-9-launches-tess-planet-hunter/
- DART was sent on a collision course with an asteroid, which of course orbits around the sun:
But because DART was launched as a dedicated Falcon 9 mission, the payload along with Falcon 9's second stage was placed directly on an Earth escape trajectory and into heliocentric orbit when the second stage reignited for a second engine startup or escape burn.
Because Danuri was launched as a dedicated Falcon 9 mission, the payload along with Falcon 9's second stage was placed directly on an
Earth escape trajectory and into heliocentric orbit when the second
stage reignited for a second engine startup or escape burn.
https://en.wikipedia.org/wiki/Danuri
At T+plus 40 minutes, with the rocket soaring over Africa, the upper stage reignited for a nearly minute-long firing to propel the payloads
on a trajectory to escape the grip of Earth’s gravity and head into
deep space.
https://spaceflightnow.com/2022/12/11/falcon-9-ispace-mission-1-live-coverage/
The Euclid telescope was launched to the Sun-Earth L2 point. So like DSCOVR, the upper stage will be between heliocentric orbit and Earth orbit.
The Psyche spacecraft was launched into a heliocentric orbit intercepting the asteroid 16 Psyche.
The single engine powering the rocket’s second stage then took over
the climb to space. After a 45-minute coast, the engine fired a second
time, putting the vehicle on the required Earth-escape trajectory.
https://spaceflightnow.com/2023/10/13/falcon-heavy-launches-nasas-psyche-asteroid-probe/
The following eleven launches at heliocentric velocities are planned:
IM-2 Nova-C lunar lander (TLI),
IM-3 Nova-C lunar lander (TLI),
Blue Ghost M1 (TLI), Europa Clipper (Heliocentric),
Hera with Juventas and Milani (Heliocentric),
Astrobotic Griffin lunar lander (TLI),
ispace 2nd lunar lander (TLI),
Interstellar Mapping and Acceleration Probe (IMAP) (Sun–Earth L1), PEE&HALO Lunar gateway station modules (TLI), Astrobotic's Third Lunar Lander (TLI),
Nancy Grace Roman Space Telescope (Sun–Earth L2)