new route to count records in batch