According to the Tor documents, Tor builds 2 circuits for each predicted port. I checked the source code to find out how it can understand that it has already built one or two circuit for a predicted port. I checked the functions:
I could not understand its process for this issue, I mean there is no counter that shows the number of circuits built for a port. For example, 2 circuits have been built for port 80.