I also wish the first version would work. If you think carefully, however, you can easily come up with scenarios in which "how many people were in the office when you arrived this morning?" and (早上上班,)你是第几个到办公室的? may lead to completely different answers. The problem here seems to go beyond the issue of to what extent one should keep the "linguistic form" of the original. In this case, the meaning of the original was partially lost in the process of translation.
Maybe we can say: How do you place yourself in the order of arrival to office this morning? Slightly better?