A sidereal day is different from solar day.
A sidereal day is the period when earth rotates 360 deg around itself. It is roughly 23hrs and 56min.
A solar day is the time period from noon to next noon. It is 24hrs. How these two can be different. Watch here.
Hence it can be inferred that earth makes 366 rotations to make a year of 365(.25) days.
S.Gurumanickam