move file counting and test approximation to adapter class