The number if hands that your roommate shook hands with is determined to be: 10 people.
How to find the number of handshakes?
Let's analyze the conditions:
a) The statement "each person did not shake his roommate's hand" implies that each person shook hands with someone other than their roommate.
b) The statement "each person shook a different number of hands" implies that no two people shook the same number of hands.
Given that there are 10 pairs of roommates, and each person shook hands with someone other than their roommate, each person must have shaken hands with one person from each of the 10 other pairs of roommates. Additionally, since each person shook a different number of hands, the number of hands shaken must be different for each person.
So, your roommate shook hands with one person from each of the 10 other pairs, totaling 10 hands shaken.