Does the sentence "By 2007, Portugal had 10,617,575 inhabitants of whom about 332,137 were legal immigrants." provide a valid answer to the question "How many inhabitants did Portugal have by 2007?"
yes