Jennifer Dunn, 32, admitted to supplying crack cocaine and heroin at an earlier hearing before her boyfriend Tony Henderson, 53, stood trial for more serious drugs offences.
Henderson was found guilty and jailed for 12 years last month.
During his sentencing, he revealed to judge Jeremy Richardson he needed to call his children before being sent down. When asked how many, he replied "27" Confused, the judge asked: "You have 27 phones?" Henderson replied: "No, I have 27 children your honour."
Dunn is pregnant with his 28th child but the judge heard Henderson has since dumped her "like a hot potato"
Hull Crown Court was told that she was a vulnerable woman and that "malign" Henderson had taken advantage of her.
Judge Richardson said: "During the trial I remember he thought that he had 'x' amount of children - but it turned out to be 'y'. Was it 28 or 29 children he had?
"But anyway, this bloke, Henderson, is a thoroughly malign individual to put it mildly - he has used and abused you in this case."
The court heard that Dunn was coping well with her pregnancy now she was free of Henderson's influence.
The judge sentenced Dunn to two years in prison, suspended for two years and made her subject to a 25-day rehabilitation requirement.
He told her: "You were very foolish to get involved with him.
"But of course there is some hope that these seeds will flourish in life - and some good will come of this in the form of a baby."
"But I warn you, if you breach this order and are back before me in this court then I will not hesitate to send you to prison - and you will lose your baby.
"I am sure social services are already involved in this and if you breach this order then you know you will go to prison and someone else will be there to look after this child."