The catalogue of Mozart's works was compiled in 1862 by the musicologist Ludwig van Köchel in a progressive manner, anticipating every work with the initial of his surname, K. Since then, it has been revised as many as 8 times, and the last one dates back to 1983. The V stands for Verzeichnis, a word with several meanings and which, in this case, should be understood as: list.
Almost always only the K is used, and sometimes KV is used, but they are essentially the same thing.
Why did it occur to me that Scarlatti is also cataloged with the "k"?
I fell for it too
Mozart's K refers to Köchel, while Scarlatti's K refers to Kirkpatrick.
Furthermore, there are two different catalogings for Scarlatti (which increase the confusion), one by Kirkpatrick and one by Longo; this is due to the double numbering of the Sonatas, cataloged as K xyz, L zyx.
Köchel cataloged Mozart's works in 1862 (as also indicated by Daniele), Kirkpatrick cataloged Scarlatti's in 1940.
Mozart's K refers to Köchel, while Scarlatti's K refers to Kirkpatrick.
Furthermore, there are two different catalogings for Scarlatti (which increase the confusion), one by Kirkpatrick and one by Longo; this is due to the double numbering of the Sonatas, cataloged as K xyz, L zyx.
Köchel cataloged Mozart's works in 1862 (as also indicated by Daniele), Kirkpatrick cataloged Scarlatti's in 1940.
they would actually be more than 2... there is also the Pestelli and even the recataloging of Kirkpatrick by Emilia Fadini....