I don't know if 1997 is history, but...
Article 4.1 of the 28 May 1997 "Agreement between the Russian Federation and Ukraine on the Status and Conditions for the Stay of the Black Sea Fleet of the Russian Federation in the Territory of Ukraine" reads as follows.
Russian original:
Общая численность личного состава, количество кораблей, судов, вооружений и военной техники Черноморского флота Российской Федерации, находящихся па территории Украины, не будут превышать уровни, определенные в Соглашении между Российской Федерацией и Украиной о параметрах раздела Черноморского флота от "28" мая 1997 года.
English translation by DeepL:
Total number of personnel, number of ships, vessels, weapons and military equipment of the Black Sea Fleet Russian Federation fleet stationed on the territory of Ukraine will not exceed the levels set out in the Agreement between the Russian Federation and Ukraine Russian Federation and Ukraine on the parameters of the division of the Black Sea Fleet of 28 May 1997.
The "Parameters" Agreement appears to be the source for the claim that the Russian Federation had the right to dispose of some 20-25,000 military personnel on the Crimean peninsula during the events of February-March 2014. The claim has been made by Russian President Vladimir Putin (e.g. here) and CIA Director John Brennan (quoted here).
Can anyone help me locate a copy of the agreement? I've searched kremlin.ru and mid.ru without success. My broader interest is in the legality and legitimacy of the events in Crimea in February-March 2014.
Edit After posting this question I found the answer, which I added to the OP. I've now moved that to an answer below.