Merge "Change total sample count type to 64 bit" into tm-dev