Bad Company 2 engineer antitank mine cap
Solution 1:
Yes, you can only have 6 Mines or C4s planted at any one time. When you plant your 7th, the 1st one you planted is removed.
Also, I believe if you die they also disappear.
Solution 2:
As Weegee said, the first mine you planted disappears when you plant the seventh (and so on). However, as far as I know the mines do not have any other limit, thus they may stay the whole round unless you plant more mines or they detonate. I haven't confirmed this myself ingame though, I just read this on the EA BC2 forums.
Solution 3:
The anti-tank mines stay in place even if you change class; they only despawn when exploded or when 7th mine is placed.