It's a bit confusing as to whether entering Bulgaria and Romania by land would be considered, today, as an entry into the Schengen area, because of the confusing situation whereby they are somehow in the Schengen area "for air and sea travel only." But it doesn't matter.
If entering Bulgaria is considered entering the Schengen area, then you will use your single entry when you enter Bulgaria, but your subsequent border crossings will be internal. If entering Hungary is the point where you will enter the Schengen area, the you will use your single entry at that point.
The accession of Bulgaria and Romania to the Schengen area has been called "for air and sea only," but it might be better said to be "for every purpose except for internal land borders." This means that your passage from Bulgaria to Romania to Hungary will comprise two internal crossings, which do not count as "entries." The fact that there will be a passport control does not change this.
The decision implementing the current state of affairs is at https://data.consilium.europa.eu/doc/document/ST-17132-2023-INIT/en/pdf but it is a bit difficult to follow because it simply lists a bunch of regulations and other legal documents that now apply to Bulgaria and Romania without saying much about their effect.