The following verse from the website valmikiramayan.net indicates the total no. of verses present in Vālmīki Rāmāyaṇa.
चतुर् विंशत् सहस्राणि श्लोकानाम् उक्तवान् ऋषिः |
तथा सर्ग शतान् पंच षट् काण्डानि तथा उत्तरम् || १-४-२
2. R^iSiH = sage Valmiki; slokaanaam = verses; chatur vimshat sahasraaNi = twenty-four, thousand; tathaa = that way; pancha sarga shataan = five, chapters, hundreds; SaT kaaNDaani cha = six, books, also; tatha uttaram = that way, an end piece; uktvaan = said.
Sage Valmiki said Ramayana in twenty four thousand verses, in six hundred chapters, in six books, likewise an end-piece too. [1-4-2]
The same verse is also present in the translation available at valmiki.iitk.ac.in:
तथा सर्गशतान्पञ्च षट्काण्डानि तथोत्तरम् ।।1.4.2।।
ऋषि: sage Valmiki, श्लोकानां चतुर्विंशत्सहस्राणि twenty four thousand verses, तथा and, पञ्च सर्गशतान् five hundred cantos, षट् काण्डानि six kandas, तथा and, उत्तरम् in addition Uttarakanda, उक्तवान् recite (composed).
Sage Valmiki composed the Ramayanam in twentyfour thousand verses in six kandas and also Uttarakanda (consisting of five hundred cantos).
However, some commentators on Rāmāyaṇa consider this verse to be an interpolation. This is what the Tilaka commentary by Nagoji Bhatta or Ramavarma (1730-1810) says:
The Number of Slokas and Sargas in the Ramayana 1.4.2
‘Sargasatam panca satskandani’ means the Ramayana comprises five hundred sargas covering six kandas . But the sloka says the total number of slokas in the Ramayana to be 24,000. Since the actual number is far less and there is no reference to the Uttarakanda this sloka is spurious.
Is this verse present in the critical edition of Vālmīki Rāmāyaṇa?