using generate statement in verilog
You can't use a 'free' generate variable 'count' thus the only solution I can come up with is to express the index of tempu and tempd in terms of i and j.
This is how your j,i go:

[j,i] = [1,2] [1,3], [1,4]   required Index:  1, 2, 3
        [2,3] [2,4]                           4, 5
        [3,4]                                 6


The best I can come up with is:

det_2x2 m1(v1[j],v1[i],v2[j],v2[i],tempu[ j==1? i-1 : j==2 ? i+1 : 6]);
det_2x2 m2(v3[j],v3[i],v4[j],v4[i],tempd[ j==1? i-1 : j==2 ? i+1 : 6]);


But it is clumsy and very specific to this code. As soon as the upper limit of the for loop changes that is no longer valid. 

It passes a quick syntax check in Vivado, but can't fully check it because I have no det_2x2.