The table is shared
Every program that says utf-8 uses the same table, so text written on one machine reads on another. The agreement is the whole point of the standard.
Count characters, size bytes
A string length counts characters. A file size counts bytes. They are equal only for plain letters, which is the common source of off-by-one bugs.