How to implement TCP/UDP protocol in Packetbeats

Can you please explain me how can I get the no.of packets is passed through the port which we assigned. And also can we know the packet loss between two server ports?? I am very new to networking