The only way for a formula field to know when there are 10,000 records is to have all of the records linked to a single control record. I do not recommend doing this.
You could have an automation script run that periodically checks the number of records and then only takes additional action when there are 10,000+ records.