If they're 32-bit numbers, they only overflow at 4294967296, but if they do overflow, it doesn't really matter. You simply define Size as unsigned int.
C:
unsigned int Size;
Size = Head - Tail;
If Tail is 0xffffff80 and Head overflowed to 0x10, the difference will be calculated correctly as 0x90.
If Size is unsigned int.
Lets take the case where there were (2^32 + 100) bytes written, so
Head = 100
And say that
Tail = 4294967196 (which is 2^32 - 100)