--- Quote Start ---
now it won't compile because it is expecting a bracket or something...error 10500
--- Quote End ---
It's really worth to read error messages thoroughly, also reviewing the referred code line.
--- Quote Start ---
Error (10500): VHDL syntax error at counter.vhd(39) near text "<"; expecting "(", or "'", or "."
--- Quote End ---
y < = 0;
Did you get an idea why the parser sees a "<" token where you seems to write a "<="? If not, delete and rewrite the line, preferably thinking about required VHDL syntax.
After fixing this trivial error, Quartus will possibly complain about reading an out signal.