The average runs scored by a batsman in a certain number of innins is 54. After he plays one more innings, in which he scored 145 runs, his average runs in all the innings played becomes a prime number less than 72. Find the total number of innings he played?