In this paper we consider the question of whether a generalized solution of the wave equation belongs to different function spaces. Consideration of classical solutions imposes substantial restrictions on the initial data of the problem. But if we proceed not from differential but from integral equations, then the class of solutions and the class of initial boundary value problems can be substantially expanded. To solve the boundary value problem for the wave equation obtained by the wave counting method, it is easy to obtain a sufficient condition for belonging to a particular class.