Modular variable counter vhdl design