A full Tor circuit has 3 relays, a Guard, a Middle and an Exit. This keeps any single relay from knowing the full path which keeps the users identity separate from their activity.
Onions connections normally use 6 relays. The client create a full circuit (3), the server creates a full circuit (3) and then the server connections from it's 3rd to the clients 3rd. This way both client and server are protected by a full circuit keeping both of their identities safe.
Neither client nor server has any real control over the connection length at either side or any way to tell what the length is. For example: in the case of a Single Onion Service, the server would connect directly to the clients 3rd relay. This keeps the users identity protected from the server, but the servers identity unprotected from users.