Hmm ok, just speaking from my experience, i still got in, but yes maybe it depends on the subject and possibly the uni.
I still doing think it would really matter. GCSE's are quite irrelevant at unis they are more interest in A level results. As long as you got the paper that says you received "x" grade for maths shouldnt be a problem i dont reckon. Also, say if you have a dream uni, and you dont get in, you can just aply through clearing. no one knows the difference.
If theres a way unis know when you sat it chances are they can probably see how many times you sat it too. also, you can turn around and say that you werent really resitting it, as that was the first time you sat it ;
when you apply to uni, you get references from your teachers. They are able to write about your personal situations etc and they can mention it if it is something you are worried about. I would ask maybe a form tutor as they usually help with the uni applications and stuff.
as for unis not liking it.... my friend goes to the unviersity of manchester, with no english gcse and no maths gcse, studying a law degree. obviously i know maths isnt needed for law but it still a requirment, even the lack of english gcse etc. at such a prestigous uni. And arguably law is also very competitive.