The problem on leaky waves in an anisotropic inhomogeneous dielectric waveguide is considered. This problem is reduced to the boundary eigenvalue problem for longitudinal components of electromagnetic field in Sobolev spaces. To find the solution, we use the variational formulation of the problem. The variational problem is reduced to study of an operator-function. Discreteness of the spectrum is proved and distribution of the characteristic numbers of the operator-function on the complex plane is found.