To find how many people who are 40 years old or younger said they preferred dogs, we look at the "40 or Younger" column under "Dogs" in the table.
According to the table, the number of people who are 40 years old or younger who preferred dogs is 983.
Therefore, the answer is:
983