Program connects and correctly counts commands.