The Mishnah we have counts around 4200. THe Gemmorah in Temura 16a says:
שלשת אלפים הלכות נשתכחו בימי אבלו של משה
three thousand halachot were forgotten during the period of mourning for Moses
The number is very exact so it looks like they counted the Halachot. So how many were there in the first place?