Refactoring get_invitations_count and invite_email_preview. Adresses Issue #66.
Fixing broken tests by previous commit.