title: One counterCache incrementing, one not - despite identical code for both
body: <p>I am developing a basic forum system and have used three counter caches in it.</p>
  
  <p>Two are for categories (Containers of threads), which have a <code>reply_count</code> and a <code>thread_count</code>, and the last is for the post itself which has a <code>reply_count</code>.</p>
  
  <p>A thread is made from multiple <code>ForumPost</code>s, where one is a thread (<code>is_thread</code> = <code>true</code>) and the rest are replies (<code>is_thread</code> = <code>false</code>).</p>
  
  <p>A part of my <code>ForumPost</code> code looks like this:</p>
  
  <pre><code>    public $belongsTo = array(
          'ForumCategory' =&gt; array(
              'counterCache' =&gt; array(
                  'thread_count' =&gt; array('ForumPost.is_thread' =&gt; 1),
                  'reply_count' =&gt; array('ForumPost.is_thread' =&gt; 0)
                  // The line above is the one not working
              )
          ),
          'Thread' =&gt; array(
              'className' =&gt; 'ForumPost',
              'foreignKey' =&gt; 'forum_post_id',
              'conditions' =&gt; array(
                  'ForumPost.is_thread' =&gt; 0
              ),
              'counterCache' =&gt; array(
                  'reply_count' =&gt; array('ForumPost.is_thread' =&gt; 0)
              )
          ),
      );
      public $hasMany = array(
          'Reply' =&gt; array(
              'className' =&gt; 'ForumPost',
              'foreignKey' =&gt; 'forum_post_id'
          )
      );
  </code></pre>
  
  <p>While this works for the most part, I have noticed one piece of strange behaviour: Threads will increment a category's thread count, but replies will not increment category's reply count, although they do increment a thread's reply count.</p>
  
  <p>I'm still getting used to CakePHP's ways of going about things like this so I might have missed something obvious but I've been pondering over this for a while - any help would be greatly appreciated!</p>
  
  <hr>
  
  <p>Edit</p>
  
  <p>The following statement is being executed:</p>
  
  <pre><code>UPDATE ... SET `ForumCategory`.`reply_count` = 8  WHERE `ForumCategory`.`id` = 0
  </code></pre>