Fix bug in OMR countObjects() method