* Earth spins on its own axis: It takes about 24 hours for the Earth to complete one rotation on its axis. This is what causes day and night.
* Earth orbits the Sun: It takes about 365.25 days for the Earth to complete one orbit around the Sun. This is what defines a year.
* Moon orbits the Earth: It takes about 27.3 days for the Moon to complete one orbit around the Earth.
So, to answer your question:
* Earth spinning around the Sun: The Earth has completed about 4.5 billion orbits around the Sun since its formation.
* Earth spinning around the Moon: The Earth does not spin around the Moon. The Moon orbits the Earth.
It's important to understand the difference between rotation (spinning on an axis) and revolution (orbiting around another object).