If P and Q are two sets such that P has 40 elements, P∪Q has 60 elements and P∩Q has 10 elements, how many elements does Q have?