An investigation by BBC Scotland also found that 14 of Scotland’s 32 councils have no on-site counsellors, while provision by other councils is not consistent.
There are now fresh calls for the Scottish Government to show greater ambition in tackling mental health problems among youngsters after a spate of recent reports which set out shortcomings.
Labour inequalities spokesperson Monica Lennon said: “Access to school-based counselling should be available to all pupils and Scottish Labour has been challenging the Scottish Government to implement our proposals for over a year.
“There is a growing child mental health crisis in Scotland and a lack of ambition on the part of the Scottish Government to respond, so we share the frustration of charities, parents and teachers.”
Earlier this year the Scottish Government launched a mental health strategy which stated that support from teachers and other school staff can be vital to youngsters’ mental wellbeing. But the findings show Edinburgh and Glasgow councils had services in 43 per cent and 93 per cent of secondary schools respectively.
Liberal Democrat health spokesman Alex Cole-Hamilton said: “This is the latest in a string of revelations about the state of mental health provision in Scotland. From children waiting hundreds of days for treatment to a late and unambitious mental health strategy, the SNP Government has yet to deliver on improving mental health provision.
“We have heard the SNP’s warm words on mental health time after time but their passive approach to mental health is not good enough and is failing future generations.”
The research also found that school counsellors had dealt with thousands of cases in the past year, including substance abuse, self-harm and depression.
Mental health minister Maureen Watt said: “Education authorities and all those working in our schools have a responsibility to support and develop the mental wellbeing of pupils, with decisions on how to provide that support taken on the basis of local circumstances and needs.
“Some will provide access to school-based counselling, others will utilise the skills of pastoral care staff and liaise with the Educational Psychological Services and health services for specialist support.”