Performance improvement.

Don't load all objects in to memory and count the Array size afterwards. Instead, perform a direct count on the Model without instantiating objects.