Camera metadata: Check for inconsistent data count

Resolve merge conflict for nyc-release
Also check for overflow of data/entry count on append.

Bug: 30591838
Change-Id: Ibf4c3c6e236cdb28234f3125055d95ef0a2416a2
