Tested and fixed bugs related to PdoRepository::count() method.