Add transactions to updateCount function