Needs["NETLink`"]
InstallNet[];

ser=NETNew["System.IO.Ports.SerialPort","COM3",9600]
ser@Open[]
«NETObject[System.IO.Ports.SerialPort]»

Button["COUNT",ser@Write["C"]]
Button["Stop program",ser@Close[]]