GIVEN sentence is in the past tense.The use of 'were visiting much' is wrong'. We need a past tense form of the verb i.e. 'visited'. 'Much' is USED for UNCOUNTABLE NOUNS, 'Many' is used for countable nouns. So, we should use 'many' as it is referring to tea terraces and spice gardens which are countable nouns.Therefore, the correct sentence is 'When we were on holiday in Kerala, we visited many beautiful tea terraces and spice gardens.'