title: In Django is it better to get a list of objects from self and use related names or from the object itself and use filter?
body: <p>The title is probably confusing but I didn't know how else to paraphrase it. Here is an example.</p>
  
  <p>Is it better to do something like this</p>
  
  <pre><code>class UserType( models.Model ) :
      def user_count( self ) :
          return self.userprofile_set.count()
  </code></pre>
  
  <p>or like this?</p>
  
  <pre><code>class UserType( models.Model ) :
      def user_count( self ) :
          # Does "user_types = self" work? I'm not sure.
          return UserProfile.filter( user_types = self.pk ).count()
  </code></pre>
  
  <p>where</p>
  
  <pre><code>class UserProfile( models.Model ) :
      user_types = models.ManyToManyField( UserType )
  </code></pre>
  
  <p><code>UserType.user_count()</code> simply returns the number of <code>UserProfile</code> who has a particular <code>UserType</code>.</p>
  
  <p>Sorry if this is a stupid, trivial question, but I was curious. Perhaps some Django expert can dig in on the actual SQL performance or something :-).</p>