A bar of mass kg lying on a horizontal plane with a friction coefficient is attached to the wall by means of a horizontal non-deformed spring. The stiffness of the spring is equal to its mass is negligible. The bar was displaced so that the spring was stretched by and then released. Find: (a) the period of oscillation of the bar; (b) the total number of oscillations that the bar performs until it stops completely.