magic numbers not allowed.

Add a local

const int EXPECTED_ITEMS = 3;

or something similar, then use that instead of 3.