All four Gospels record Jesus telling Peter that before a rooster crows, he will deny Him:
Matthew 26:34
34 Jesus said unto him, Verily I say unto thee, That this night, before the cock crow, thou shalt deny me thrice.
Mark 14:30
30 And Jesus saith unto him, Verily I say unto thee, That this day, even in this night, before the cock crow twice, thou shalt deny me thrice.
Luke 22:34
34 And he said, I tell thee, Peter, the cock shall not crow this day, before that thou shalt thrice deny that thou knowest me.
John 13:38
38 Jesus answered him, Wilt thou lay down thy life for my sake? Verily, verily, I say unto thee, The cock shall not crow, till thou hast denied me thrice.
Note that only in Mark does Jesus give the detail that a rooster will crow twice. We use this information to deduce that the other accounts are referring to this second rooster (even though the other accounts don't explicitly record this detail).
The accounts of Peter's denials do not contradict. It's easy to piece together what happened, and who Peter denied Jesus to:
The accounts do not contradict each other on any detail. Most of the denials are to more than one person, and none of the accounts say Peter only denied to so-and-so. If they did, that would be a bona fide contradiction.
If a criminal has just been arrested and someone vocally accuses you of being associated with him, then others are going to turn to look. That meant that Peter denied Christ to many more than 3 people, but there were 3 separate occasions in which he did so.
Jesus's prophecy came true, and none of the accounts contradict. We simply get more details by reading all four accounts, which is why we have four Gospels.