fixed a record counting bug (was using the wrong model)