We use the daily max numbers of records as reported by the usage api (https://www.algolia.com/doc/rest-api/usage/#indices), and we waive the top three biggest values for the given period. The records contained in temporary indices are counted as part of your records usage.
For example, if your daily number of records for a given billing month was 1000 records, except for one day where you had a bug and you went up to 100 000 records, you will be billed for 1000 records.
Here you can find more details about how we count records:
https://support.algolia.com/hc/en-us/articles/17245378392977-How-does-Algolia-count-records-and-operations