Fixed #5041 with new User method to find total accounts excluding closed and invitations