Update new getTotal method in Db\Record