So my question is that let's say I have a bit string of length four. If it is illegal to have 3 1's in a row and 3 0's in a row then how many bit string of this type exists
I was thinking that in total combination of bit strings of length four there is $2^4$, but in this case there is 2+2 illegal combinations so the total is
$2^4-4$ is this correct?
No. There are $6$ illegal strings. Just write them out. Unless 'three in a row' means exactly three in a row ... but that's not how I would interpret that question ...