Stephen-comitatus png
(602.89 KB, 666x443)
While there is some, discrepancy between historians, we could say that Stephen organized 39 comitatus to the west from the Tisza river. On the other side of the Tisza and north of the river Körös, he created only 3, and in Erdély 4. Later kings finished his work, the number of counties clocking 72 the most.
Beyond these, Stephen also created marches for the border lands, marchia or comitatus confiniorum, occasionally called tribunus. They were protecting crossings at border rivers, and so called "gates", had their own castles with border guards who were called as custodes confiniorum. There were two such in the west along the Danube, one between the rivers of Dráva and Száva (Slavonia), one in Erdély.
One important note. The creation of the counties went hand in hand with the organization of the Hungarian Church. One comitatus covered the area of one deanery I think this is the correct term, an ecclesiatical unit. One bishopric or arch-bishopric consisted of several deanery.
And probably the last note: when the organization happened, the king and his advisers, the royal senate, were thinking about how the king can project his military power over his lands. They picked castles which became these military centers, and they organized the land (workforce) so it can upkeep it. Then these places were suitable for judical work, collecting taxes and tolls, gathering duties at the markets near the castles.
They wanted to solve a practical problem, and from the first few successful examples they started to apply the patterns creating new counties, but all with some local characteristics, depending on the local situation.