public function checkTransformationCount(EventInterface $event) {
        $transformations = $event->getRequest()->getTransformations();

        if ($this->transformationLimit && (count($transformations) > $this->transformationLimit)) {
            throw new ResourceException('Too many transformations applied to resource. The limit is ' .
                                        $this->transformationLimit . ' transformations.', 403);
        }
    }