Google some images on the optical encoder. Basically there is a set pattern in the disk and a light is shined through it. At any given point the light will only shine through a certain pattern of holes on the disk, this gives you absolute shaft angle, and this feedback will allow you to tell the PLC what angle the shaft is at and you will define how many revolutions are required to get to a certain point. One revolution of the shaft might move a belt 100mm, so you can say that if the shaft has moved 1/4 of 360 degrees (or 90 degrees), that is 1/4 of a turn or 25mm.
What you are describing as a microswitch is a type of switch that uses the "roller" to actuate a mechanical device to open then close a circuit. You would route this to an input card on the plc with a counter to determine a number of parts. The switch would rotate a little, close a set of contact and make the input to the PLC, then the counter would go up. These are pretty much a fancy type of limit switch (limit switches have a lot of information on them).
Inductive proximity switches utilize a magnetic field to either open (for a NO switch) or close (for a NC switch) to complete a circuit. There are various types, but basically they function the same. A magnetic field is created that sets a state of the switch, then the magnetic field is disturbed by the metal. This will change the state of the switch and make or break a tiny set of contacts inside. A simple form of this is called a "Reed switch" and they are largely used in safety circuits.
A thermocouple is a device utilizing the principal that when two different metals (that will have two different types of atoms and two different charges) are bonded together and heat is applied that energy will cause a potential difference to be created in the metals. The current will then flow to the Analog input of the PLC card. You then scale the voltage (usually 4-20mA) to the scale of your temperature range, such as 20-350 C. Think simple algebra and an XY coordinate plane. Each X (or voltage) has one and only one Y (or temperature). You then use this to set another condition in the PLC to do something. It can be an On/Off state or it could be another scale (such as a FAN Speed)
Some good practices for these in order:
Use a PLC to cause a part to move from one end of a conveyor to another end using an encoder. You will need to figure out the amount one rotation of the encoder moves the conveyor to do this.
Make a motor starting circuit via PLC outputs and put a proximity switch of some sort (such as a magnetic safety switch/reed switch) as a safety. If the switch is broken the motor turns off.
Set up a limit switch of some sort and use a counter to stop a belt at a set number of parts making the switch.
Use an analog input/output card and a thermocouple or process meter to control the motor speed via the analog speed reference on a VFD. You will need product manuals, the SCP instruction set in RSLogix (if Allen Bradley is your manufacturer) and to understand how to NOT mix the power sources in the VFD and PLC. This topic can be a bit complicated if you aren't familiar with electronics.
Hopefully this helped you out man.
And sorry I'm not familiar with the encoder interface.