If I stay in the UK as an EU citizen, will my two and a half years under the first FLR (m) count towards the 5 years necessary for an EU citizen to get permanent UK residence/citizenship?
No, it won't. You will lose that two and a half years towards settlement in the UK and will start again under EU rules. UK immigration rules and the EEA Regulations are not interchangeable. As you have a UK immigration rules "visa" that gives you Limited Leave to Remain, and the visa you have puts you on a path to Indefinate Leave to Remain (ILR = settlement), the "5 years to ILR clock" will stop when your visa expires and that time towards settlement in the UK, will be lost. Your minimim of 5 years needed to the EU's "PR" in the UK, will start at zero.
EU rules as not like UK "visas". To get the EU's "PR" in another country, EEA citizens must be what the EU says is a "qualified person" continuously for 5 years: worker, jobseeker (now limited in time), self sufficient or student. The self sufficients and students need to buy their own Comprensive Sickness Insurance and can't live on welfare from that country because these are "economically inactive" and must not be an "undue burden" to another country.
The EU's Directive on Free Movement of Persons, does not allow a single day when we not a "qualified person" in another EEA country and if we are, it resets our "EU 5 years to PR clock" to zero again. Sometimes an EEA country will allow these a few days, but they don't have to.
These are the present rules that the UK applies for EEA citizens in the UK, but they change all the time-
"This document explains how UK Visas and Immigration assesses if an EEA national is a qualified person."https://www.gov.uk/government/publications/european-economic-area-nationals-qualified-persons#For citizenship, you will either need ILR, or proof of the EU's "PR", but everyone has to pay the same fee with an application for citizenship and all come under the same British Nationlity laws, which are different to the rules for ILR or the EUs "PR". The UK states that British citizenship is "a privilege and not a right" which is why a refusal of citizenship cannot be appealed.
ILR is the end of UK immigration rules and PR is the end of EU rules and both these are grants of leave that are subject to certain conditions.
EU rules will end on Brexit and "PR" is EU rules.