title: I cant get Domain.count() static method to work
body: <p>The Grails documentation defines a "count" static method, defined in the documentation like this:</p>
  
  <pre>
  Description
  
      Counts the number of instances in the database and returns the result
  
  Parameters
  
      None
  
  Example
  
      def noOfBooks = Book.count()
  </pre>
  
  <p>However, whenever I call it, I get this error! I simple added a call to the name of my Domain Class (Company) like this to a working Controller</p>
  
  <pre><code> def companies = Company.count()
  </code></pre>
  
  <p>and when it exectutes that line, it blows up with the following error</p>
  
  <pre><code>org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pluginManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: Unable to locate constructor with Class parameter for class org.codehaus.groovy.grails.commons.DefaultGrailsControllerClass
  </code></pre>
  
  <p>Other, working, code in the controller (pre-generated with the static scaffolding commands) access Company.get(...) etc, with no error</p>
  
  <p>What am I doing wrong?</p>