You can use semantic actions to store the expected list length and the number of list items parsed and then fail the parser of the repeated item one entry before the last.
Untested code:
unsigned expected_length;
unsigned current_length;
auto store_length = [&](auto& ctx) { expected_length = _attr(ctx); _pass(ctx) = (expected_length > 0); };
auto check_for_last = [&](auto& ctx) { _pass(ctx) = (++current_length < expected_length); };
auto last_item = [&](auto& ctx) { _pass(ctx) = (current_length == expected_length); }
auto r = little_dword[store_length] >> +(my_item[check_for_last]) >> my_item[last_item];
This rule cannot be nested or the local variables will be overwritten.