Scotland has almost 250 fewer schools open to pupils since the SNP came to power, new statistics have revealed.