I don’t see anything in the dictionary indicating “decline” can’t be plural.
there were declines in the amount of fish and beef consumed in the UK
As written, this indicates multiple separate declines in the total amount of both fish and beef consumed. I doubt that is what was meant.
there were declines in the amounts of fish and beef consumed in the UK
"Code" in the sense of "computer code" is a mass noun, and so has no plural. It would be "lines of code".
code .... Computing mass noun Program instructions. ‘assembly code’
... ‘The answer is 609,000 and this is the number of lines of code in the software for the computers and avionics systems.’ (Lexico - https://www.lexico....