To answer this, note that the time it takes for the Earth to spin on its axis once is NOT a day. A day is from mean noon to mean noon. When the Earth has rotated once from noon, it is not quite noon, as the Earth has revolved around the Sun, putting the Sun in a different place in the sky. It has to rotate 4 more minutes to get to noon. We see this in the stars setting 4 minutes earlier every night.

The answer depends on what year you are talking about. The two most common types are the tropical year, the times it takes for the seasons to repeat, and the sidereal year, the time it takes for the Earth to revolve around the Sun. You said "year" rather than "revolution", so I am assuming you mean the common meaning of year, which is the tropical year.

If that's the case, it takes the Earth 365.2422 days to revolve around the Sun, but in that time the Earth has revolved around that many times, plus it has revolved an extra time to cause the constellations to revolve around our sky once. So the number of times the Earth spins in a year is 366.2422. Rounded to the nearest integer (I assume that is what you mean by "number"), it is 366.