TypeScript Convert unknown[] to number

I use knex to update and returning number of rows been updated. It seems that knex returning update return unknown[]. But when I do checking using typeof it is actually number.

But apparently Typescript not allowed me to simply convert it.
So below is the solution.