Story 43112191: refactoring count method to RelatedModel