Added get occurences method.