please use code tags and indentations for easier reading, as for the pin planner search the forum, there are posts that might help you, if you still have problems, please start a separate thread for that.
As you talk about VHDL program, I assume you are new to fpga's. So a few tips:
Try using signals instead of variables, this will help you with debugging and will make the behavior more predicitve.
vhdl has an elseif statement: if condition then dosometing elsif condition dosomethingelse else doanotherthingelse end if;
as for your counter I do not quite understand what you want.
Apart from that, try thinking of the hardware you want to create.
(and try to avoid using buffers instead of in, out,inout, as far as I know this is considered bad practise, use a internak signal instead.)