Assuming that the blocks have the same size n x m and a two-fold rotational symmetry, is the general formula:
[$](2n-1) \cdot \lceil \frac{m+1}{2}\rceil + (m+n-1) \cdot \lceil \frac{m+1}{2}\rceil[$]
?
It can be readily generalised to d dimensions. Imagine Lego in 10D
BTW, in William Gibson's Pattern Recognition, he says about its two protagonists "Their boy-girl Lego doesn't click." (to explain why they are just friends, not in a romantic relationship). I've never actually understood what that meant. Do you know?