Pinky scored 40 marks in a test getting 3 marks for each right answer and losing 1 mark for each wrong answer. Had 4 marks been awarded for each correct answer and 2 marks were deducted for each wrong answer, then Pinky again would have scored 40 marks. How many questions were there in the test?