uint16_t au16data[16]; is sizeof() = 2*16 byte = 32 byte.
With au16dataSize (sizeof(au16data) / sizeof(au16data[0])) you are computing the number of elements in the array (32 / 2). Not the size in bytes. So that will 16.
The matrix is a 2x16 uint16_t (=2 Byte) elements is going to be 2162 = 64 byte (= sizeof(matrix)).
Then,
should be 64 / 16 = 4.
So, the output
is correct.
If you want to know how many 16-element uint16_t vectors the matrix has, the correct expression would be sizeof(matrix) / sizeof(au16data). That would be 64 / 32 = 2.