update pending count not via trigger