We present a general counting result for the unstable eigenvalues of linear operators of the form JL in which J and L are skew-and self-adjoint operators, respectively. Assuming that there exists a self-adjoint operator K such that the operators JL and JK commute, we prove that the number of unstable eigenvalues of JL is bounded by the number of nonpositive eigenvalues of K. As an application, we discuss the transverse stability of one-dimensional periodic traveling waves in the classical KP-II (Kadomtsev-Petviashvili) equation. We show that these one-dimensional periodic waves are transversely spectrally stable with respect to general two-dimensional bounded perturbations, including periodic and localized perturbations in either the longitudinal or the transverse direction, and that they are transversely linearly stable with respect to doubly periodic perturbations.where the subscripts denote partial derivatives with respect to the spatial variables (x, y) and the temporal variable t. This equation is referred to as the KP-II equation, where the index II stands for the version relevant to the case of negative transverse dispersion. The KP-I equation is obtained by replacing the positive sign in front of the term u yy by a negative sign, and it is relevant to the case of positive transverse dispersion. Both versions of the KP equation are two-dimensional extensions of the KdV equation u t + 6uu x + u xxx = 0, (1.2) that governs one-dimensional nonlinear waves in the longitudinal direction of the x axis. Just like the KdV equation, the KP-II and KP-I equations arise as particular models in the classical water-wave problem, in the cases of small and large surface tension, respectively.The KP equations quickly became very popular due to their integrability properties [26], including a rich family of exact solutions, a bi-Hamiltonian structure and the recursion operator, a countable set of conserved quantities and symmetries, as well as the inverse scattering transform techniques. At the same time, they became popular in the analysis of the stability of nonlinear waves, both relying upon functional-analytic methods and integrability techniques. As a model equation for surface water waves, some of the obtained results were extended to the Euler equations describing the full hydrodynamic problem [5,12,29].Stability properties of traveling waves are quite different for the two versions of the KP equation. While both periodic and solitary waves are transversely unstable in the KP-I equation (e.g., see recent works [8,15,27,28] and the references therein), it is expected that they are transversely stable in the KP-II equation [1,16]. Numerical evidences of these stability properties can be found for instance in [19,20]. For the case of solitary waves, the transverse nonlinear stability has been recently proved for periodic transverse perturbations in [23], and for fully localized perturbations in [22]. In contrast, there are few analytical results for periodic waves for which, in particular, the question of transverse non...