Does time spent on a working holiday visa count towards indefinite leave to remain qualification?

No - only time spent on a visa that leads to settlement counts towards indefinite leave. Working Holiday or Tier 5 visas (under the Youth Mobility Scheme) aren't long term visas that lead to settlement in the UK. Therefore any time spent in United Kingdom on those visas does not count when you made your application for indefinite leave to remain. Time spent on a Tier 2 work permit, a Tier 1 Highly Skilled Migrant Permit (HSMP) or Ancestry Visa will count. Of course these are just the most common visa types - there are other paths to settlement. You need 5 years in total of time on Work Permit / HSMP to get ILR.