Questions about similarly confusing numbering by NASA:
The USSR's space program during the Soviet era was quite secretive, and generally kept their failures quiet. The 1975 launch, following Soyuz 17, would have been Soyuz 18 if it had launched successfully, but the launcher failed to properly separate its second and third stages, and the Soyuz had to fire its own engines to separate from the booster and abort the mission. The following mission was designated Soyuz 18 once it safely reached orbit.
The USSR usually referred to the failed launch as the "April 5th anomaly".
I believe "Soyuz 7K-T No. 39" was in fact the 39th launch in the Soyuz program counting uncrewed launches* (which were almost all designated as Kosmos rather than Soyuz). To get to 39, I am counting test launches of the LK lander on Soyuz boosters (e.g. Kosmos 379), and Soyuz 7K-L1P spacecraft launched on Proton boosters (e.g. Kosmos 154).
The 1981 Soyuz 39 was more or less where you'd expect sequential-numbering-wise, but the program was switching over from the Soyuz 7K-T model spacecraft to the Soyuz-T, and Soyuz-T flights had their own series designations, so the sequence went: Soyuz 38, Soyuz T-3, Soyuz T-4, Soyuz 39, Soyuz 40.
If you're confused, don't feel bad. All the naming of Soviet-era space stuff is confusing. "Soyuz" refers to at least three different but related things: the Soyuz spacecraft, now flying for over 50 years in several versions; the Soyuz launcher, also still flying; and the Soyuz program. The name "Kosmos" was applied to every space mission the Soviets didn't want to talk about, whether it was spy satellites, failed spacecraft, or uncrewed test flights. Soyuz launchers launched Zenit satellites, Zenit launchers launched Tselina satellites, Tsyklons launched Strela satellites, and all of those missions were labeled "Kosmos".
* The Wikipedia list appears to have a few errors and omissions in it.